This is the mail archive of the
mailing list for the GCC project.
Re: [C++ PATCH] Warn about use of __func__ when -pedantic
On Thu, 13 Dec 2007, Doug Gregor wrote:
| On 13 Dec 2007 11:48:46 -0600, Gabriel Dos Reis <email@example.com> wrote:
| > Andreas Schwab <firstname.lastname@example.org> writes:
| > | "Doug Gregor" <email@example.com> writes:
| > |
| > | > While reviewing C++0x features that GCC already provides support for,
| > | > I noticed that we don't bother to complain about the C99 "__func__"
| > | > feature in strict C++98 mode, even though this feature is not part of
| > | > C++ 1998/2003.
| > |
| > | Since __func__ is in the implementation's namespace I don't think there
| > | is a need for a diagnostic. GCC doesn't warn in C89 mode either.
| > Agreed. Unless we change our policy and warn about use of any
| > identifier in implementation name space -- which, IMO, would not be
| > very useful.
| Okay, that makes things easy. I'll commit the testcase and but nothing
| unless a C++ FE maintainer wants to speak up in favor of this patch.
All C++0x has done on this specific thing is to standardize existing
(GCC or other implementations) practice. It would be very wrong to
reward users with diagnostics.