preprocessor bug(?)
Geoff Keating
geoffk@geoffk.org
Fri Nov 8 12:34:00 GMT 2002
Neil Booth <neil@daikokuya.co.uk> writes:
> Zack Weinberg wrote:-
>
> > On Thu, Nov 07, 2002 at 04:19:31PM -0800, Dale Johannesen wrote:
> > > One of our users just did this:
> > >
> > > // comment, space character follows the backslash:\
> > > main() {
> > > }
> > >
> > > gcc ignores the space character, which causes the comment to eat the
> > > next line.
> > > That's wrong, isn't it?
> >
> > No, that's an intentional feature. From the manual:
>
> We get so many complaints about this I'm starting to wonder if we should
> drop it. Further, it complicates a stages 1 and 2 prescan, should we ever do
> that.
I would suggest that, as a policy, the meaning of a program be
affected only by things that users can see in an editor.
I would certainly like a warning for this, no matter how it's
interpreted. I can just imagine someone spending hours trying to work
out why their complicated macro definition (or really neat comment)
causes syntax errors, and finally discovering that there was a stray
space... or that their intentional space got removed and they didn't
notice.
--
- Geoffrey Keating <geoffk@geoffk.org>
More information about the Gcc
mailing list