This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 <gdr@cs.tamu.edu> wrote:
| > Andreas Schwab <schwab@suse.de> writes:
| >
| > | "Doug Gregor" <doug.gregor@gmail.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,

Thanks.

| 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. 

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]