preprocessor bug(?)

Dale Johannesen dalej@apple.com
Thu Nov 7 19:55:00 GMT 2002


On Thursday, November 7, 2002, at 06:06  PM, Zack Weinberg wrote:
>>
>> No, they didn't get a warning, and neither do I.
>
> $ cat > test.cc  # trailing space on next line
> // blah blah \
> int i;
> $ gcc-3.2 -S -Wall test.cc
> test.cc:1:1: warning: multi-line comment
> $ gcc-3.2 --version
> gcc-3.2 (GCC) 3.2.1 20021103 (Debian prerelease)
> [yada]
>
> Same results with a .c file.  Please tell me the version of the
> compiler you've got; you're probably missing a patch.

I do get the warning above with -Wall, but not without.  However,
if the \<space> is not in a comment, I get this:

backslash.c:3:1: warning: backslash and newline separated by space

which is much nicer and appears with or without -Wall.  It's the
same processing phase, so the message should be consistent, right?:)



More information about the Gcc mailing list