This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Still a lot of C++ files getting "fixed"
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Still a lot of C++ files getting "fixed"
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Wed, 26 Jan 2000 14:17:05 -0800
- Cc: austern at sgi dot com, autogen at linuxbox dot com, gcc-bugs at gcc dot gnu dot org, mark at codesourcery dot com
- References: <200001262138.QAA12458@caip.rutgers.edu>
On Wed, Jan 26, 2000 at 04:38:23PM -0500, Kaveh R. Ghazi wrote:
> > From: Zack Weinberg <zack@wolery.cumb.org>
> > >
> > > Since the "foo//*bar*/" case is valid c89, I think _not_ warning is
> > > perhaps the right thing to do.
> >
> > I think you misunderstand. -ansi -pedantic shouldn't parse // as a
> > comment start at all. -std=gnu89 -pedantic should parse // as a
> > comment start but give a warning because an extension is being used.
> > (Probably only once per input file, to avoid extreme obnoxiousness.)
> > zw
>
> Yes, for user code.
>
> I still think we should always silently accept // comments in system
> headers no matter what. Even if -ansi -pedantic. (Otherwise we can't
> stop "fixing" these headers.)
>
> It does not serve the user to warn them e.g. stdio.h uses a //
> comment. Agreed?
Agreed. I am testing a patch which implements this behavior in cpplib
right now.
It does not appear to be practical to do the same for cccp, because
the comment-skipping code is scattered all over the source and looks
too fragile to muck with. I'm going to consider this the last nail in
cccp's coffin. (See other post to main list.)
zw