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 c/51437] GCC should warn on the use of reserved identifier/macro names


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

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

--- Comment #6 from Rich Felker <bugdal at aerifal dot cx> 2012-02-19 04:27:43 UTC ---
I would greatly like to see this as well; actually I was just about to file a
duplicate report when I found this, as a result of finding "struct _Color" in
GIMP source... >_<

I think the system headers issue could be handled very easily, with no false
positives and few false negatives. The heuristic would basically be to flag any
occurrence of reserved names except in header files found in the -isystem path,
or in text resulting from expansion of a macro defined by a header file in the
-isystem path.


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