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: "josh at joshtriplett dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 19 Feb 2012 18:50:34 +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 #12 from Josh Triplett <josh at joshtriplett dot org> 2012-02-19 18:50:34 UTC ---
(In reply to comment #10)
> (In reply to comment #9)
> > However, note that the standards also reserve various other classes of names,
> > such as types ending in _t, for which GCC should only flag definitions, not
> > uses. Only system headers should define new _t types, but user code can *use*
> > types like time_t or pid_t without warning.
>
> These are only reserved for POSIX, and should not always be warned about!
I stand corrected. I thought that the C standard reserved types with a _t
suffix, but I just re-checked the C99 and C11 specs and they don't have that
reservation, only some more specific reservations such as the others I
mentioned.