This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: aggressive fixincludes
- To: gcc at gcc dot gnu dot org, per at bothner dot com, autogen at linuxbox dot com
- Subject: Re: aggressive fixincludes
- From: korbb at sourceware dot cygnus dot com
- Date: Tue, 23 Nov 1999 10:23:35 -0800 (PST)
- Reply-To: "Bruce Korb" <ddsinc09 at ix dot netcom dot com>
> "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
>
> How common is that this actually does anything useful, even with
> -ansi? I.e. does it really happen that that people #include header
> files containing //-comments in C programs?
Yes. :-(
> I guess it can happen on platforms where the vendor C compiler
> allows //-comments. But is this a real problem?
Yes, as long as -ansi disables //-comment processing.
> A side note: The fix-includes replacement does not change //-comments
> to /*-comments; it completely removes them. I don't think this is
> a good idea.
There are several //-comment fixers inside the old fixincludes script.
One tried to turn it into a comment, the others stripped it.
Making a comment of it was fragile, so when I "combined" all
the fixes, I used the robust approach. Nuke it. Since these
files are not generally perused visually, it should make little
difference.
> The point is academic, however, if we agree to not "fix" //-comments.
>
> I think fixing //-comments may have made sense when //-comments
> were not allowed in Gnu C; now it seems (!) to make very little sense.
IFF you do something reasonable with the -ansi option.
I.e. add in code to process //-comments in system headers,
but not other text. Yuck any way you cut it.