Date: Wed, 09 Oct 1996 17:43:50 +0000 From: Bill Currie Subject: Re: Possible GAS bug To: Francisco Gochez Cc: djgpp AT delorie DOT com Message-id: <325BE456.67A8@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <53egsu$1f8 AT boursy DOT news DOT erols DOT com> Francisco Gochez wrote: > > It took me an hour to find a syntax error in an assembly language module > I had written, because the error was being caused by whitespace in the > code. It occured after placing spaces (not on purpose) after backslashes > at the end of lines of macros. > Here is an example: > > #define mymacro() \ > movl %eax, %ebx ; \_SPACES_PLACED_HERE_ > movl %ecx, %edx ; \ > movl %edx, %eax > > When GAS encounters these spaces, it appears to choke on pieces of the > code, warning the programmer that parts of certain lines have been > ignored, and failing to compile in the process. Actually, the problem is in cpp (rather than gas, which knows nothing about #defines) and it's not really a bug. The '\' must ALWAYS be at the END of the line. ie no trailing white space etc. Bill