This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/51437] 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:50:18 +0000
- Subject: [Bug c/51437] GCC should warn on the use of reserved identifier/macro names
- Auto-submitted: auto-generated
- References: <bug-51437-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51437
--- Comment #2 from Ruben Van Boxem <vanboxem.ruben at gmail dot com> 2011-12-06 11:50:18 UTC ---
(In reply to comment #1)
> (In reply to comment #0)
> > For C and C++, Clang
>
> Ahem!
>
> > For C++ a single underscore is also reserved for the global namespace.
>
> That comes from C, not C++:
> "All identifiers that begin with an underscore are always reserved for use as
> identifiers with file scope in both the ordinary and tag name spaces."
Fair enough. I warned you, I only quickly glanced at both standard documens :)