[C++ PATCH] Warn about use of __func__ when -pedantic
Thu Dec 13 18:27:00 GMT 2007
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
else, unless a C++ FE maintainer wants to speak up in favor of this
More information about the Gcc-patches