Message-ID: From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Strange Assembler errors on compile Date: Tue, 14 Apr 1998 17:02:17 +0100 MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk elizabeth anne dominy writes: > It compiles absolutely perfectly when I have no optimizations on, > but as soon as I compile with -O at any level it produces errors > of the form, > >Assembler Errors: >Error : d:/proglang/djgpp/tmp/rhaaaaa.tmp: operands given do not match > any known 386 instruction. This usually indicates that you have used the extended asm feature with some incorrect constraints on your parameters, for example specifying any source for a variable which must really always be in a register. Changing the optimisation level will alter where gcc decides to store your variables, and this may result in some invalid operations being passed through to the assembler (eg. comparing two immediate values). > When I try to open the file (I'm using RHIDE) it opens a blank file. > I figure this is because of the fact that the file is a temporary > compiler file. Is there any way I can actually see what exactly the > compiler is complaining about with reference to MY source? The only way I am aware of is to compile with -S to produce an asm source file, and then run this directly through the assembler. That will give you an error line number in the generated .s file, but you can probably find enough information by looking at this to relate the problem to your original C source. Shawn Hargreaves.