This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/51437] New: GCC should warn on the use of reserved identifier/macro names
- From: "vanboxem.ruben at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Dec 2011 11:20:00 +0000
- Subject: [Bug c/51437] New: GCC should warn on the use of reserved identifier/macro names
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51437
Bug #: 51437
Summary: GCC should warn on the use of reserved
identifier/macro names
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: vanboxem.ruben@gmail.com
For C and C++, Clang should warn when user code uses identifiers or macros that
are implementation-reserved.
For C(99), this would mean names starting with an underscore followed by
another unerscore or capitalized letter.
For C++ a single underscore is also reserved for the global namespace.
I could have messed the above rules up, but these are the cause of a lot of
unexpected bugs, and a warning would be super-easy to implement.