This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Still a lot of C++ files getting "fixed"


 > 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?

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]