From: "Salvador Eduardo Tropea (SET)" To: billc AT blackmagic DOT tait DOT co DOT nz, arcanix AT erols DOT com Subject: Re: Possible GAS bug Cc: djgpp AT delorie DOT com Date: Wed, 9 Oct 1996 14:44:38 +0300 (GMT) Message-ID: <9610091445.aa12991@ailin.inti.edu.ar> Hi here SET from Argentina: >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. To avoid this problems we'll have a good tool: RHIDE Beta 6 (not yet public available). In Beta 6 the editor kills all the trailing spaces and the syntax highlight can show you when the preprocesor lines are connected and when not. The editor have an improved highlight of the comments covering a "feature" of gcc with the // comment and the '\' at the end of the line. bye SET. ******************************************************************************** Salvador Eduardo Tropea (SET) - salvador AT inti DOT edu DOT ar Work: INTI (National Institute of Industrial Technology) Sector: ICE (Electronic Control & Instrumentation) Post (Home): Curapaligue 2124 - Caseros (1678)- Buenos Aires - Argentina