public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/51437] New: GCC should warn on the use of reserved identifier/macro names
@ 2011-12-06 11:20 vanboxem.ruben at gmail dot com
  2011-12-06 11:37 ` [Bug c/51437] " redi at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: vanboxem.ruben at gmail dot com @ 2011-12-06 11:20 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-09-23 20:20 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-06 11:20 [Bug c/51437] New: GCC should warn on the use of reserved identifier/macro names vanboxem.ruben at gmail dot com
2011-12-06 11:37 ` [Bug c/51437] " redi at gcc dot gnu.org
2011-12-06 11:50 ` vanboxem.ruben at gmail dot com
2011-12-06 13:34 ` redi at gcc dot gnu.org
2011-12-16 11:55 ` potswa at mac dot com
2012-02-19  4:42 ` bugdal at aerifal dot cx
2012-02-19  5:48 ` josh at joshtriplett dot org
2012-02-19  6:30 ` bugdal at aerifal dot cx
2012-02-19  8:01 ` josh at joshtriplett dot org
2012-02-19  9:34 ` vanboxem.ruben at gmail dot com
2012-02-19 11:17 ` potswa at mac dot com
2012-02-19 18:57 ` josh at joshtriplett dot org
2012-02-19 18:58 ` josh at joshtriplett dot org
2012-02-19 22:42 ` vanboxem.ruben at gmail dot com
2021-11-18 21:21 ` tkoenig at gcc dot gnu.org
2022-07-24 18:08 ` pavel.morozkin at gmail dot com
2022-09-23 14:24 ` redi at gcc dot gnu.org
2022-09-23 20:20 ` pavel.morozkin at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).