Sender: nate AT cartsys DOT com Message-ID: <35F2BF67.5EE4EF08@cartsys.com> Date: Sun, 06 Sep 1998 09:59:19 -0700 From: Nate Eldredge MIME-Version: 1.0 To: Endlisnis CC: djgpp AT delorie DOT com Subject: Re: Bug in GCC? References: <35F296C8 DOT EE7B49C7 AT unb DOT ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Endlisnis wrote: > > The program doesn't compile as I would expect. All it was spose to do is > show how you could use inline asm to add 2 integers. But, the return value > was always 4. So I looked at the asm code generated for the function, it > reads from port 0x83 and does some loops and stuff. All I wanted was 1 add. > And the debugger (when the asm window is open) can't debug it right. It > skips lines and weird things happen, registers change values without any > obvious reason. > > Note: Moving the function after the main makes GCC compile it as expected. I > am using DJGPP v2.8.1 from RHIDE with "-Wall" and "-g" on, nothing else. > Also, I've tried compiling it on a different machine with the same results. That is extraordinarily bizarre. Could you: * Find out *exactly* what switches RHIDE invokes GCC with. * Post the complete asm produced. -- Nate Eldredge nate AT cartsys DOT com