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]
Other format: [Raw text]

[Bug bootstrap/14520] [3.3 only] fixincludes mishandles comment containing #include in stdlib.h


------- Additional Comments From jifl-bugzilla at jifvik dot org  2004-03-11 16:19 -------
One assumes this is a fix for a problem with a specific header from a specific
OS, so on the face of it we don't need to generalise it for all possible ways it
could occur.  I've seen spaces between the # and include more often than
comments at the start, for example. We can't really reimplement the cpp parser
in regexp :-).

So if the system header this was intended to fix doesn't use comments there,
which is most likely, then there would be no problem, even though it's permitted
by the preprocessor's syntax strictly. It's an obsolete OS of course, so it's de
facto impossible to tell though. I think I could reasonably argue for throwing
caution to the wind in this one instance ;-).

However your point may be more relevant for the other regexps matching #include.
The alternative would be to implement some extra phase to fix-header.c
specifically to excise comments, to avoid any problems.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14520


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