This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: warning: multi-line comment (why?)
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: warning: multi-line comment (why?)
- From: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Date: Mon, 18 Sep 2000 12:04:19 +0200
- Cc: Craig Rodrigues <rodrigc at mediaone dot net>, gcc at gcc dot gnu dot org
- References: <20000917185453.A14829@mediaone.net> <20000917162647.A19521@cygnus.com>
Richard Henderson wrote:
> > What is the point of this warning? Shouldn't the preprocessor
> > just ignore everything between the // and the end-of-line?
>
> No, backslash-newline conversion happens before comments
> are discarded. You really do have a multi-line comment;
> one that would be dangerous if your next line weren't a
> comment as well.
But the next line _is_ a comment so the warning is inappropriate here.
If this were a very unlikely situation, fair enough. But people do
comment out multi-line macros from time to time using `//', and those
will trigger the warning.
It can't be too hard to skip whitespace and then check for `//' on the
next line I'm sure.
-- Jamie