This is the mail archive of the 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: aggressive fixincludes

> "Kaveh R. Ghazi" <> 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

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

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