This is the mail archive of the
mailing list for the GCC project.
Re: [C PATCH] Diagnose predefined identifiers in pedantic mode
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Aug 2014 17:46:09 +0000
- Subject: Re: [C PATCH] Diagnose predefined identifiers in pedantic mode
- Authentication-results: sourceware.org; auth=none
- References: <20140810151626 dot GZ24292 at redhat dot com>
On Sun, 10 Aug 2014, Marek Polacek wrote:
> We weren't properly diagnosing neither the __func__ (introduced in C99),
> nor the __FUNCTION__/__PRETTY_FUNCTION__ (GNU extension) predefined
> identifiers. I believe we should; the compiler ought to have a
> compile-time switch for turning off extensions.
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
OK presuming uses of these in macros defined in system headers, such as
assert(), do not result in -pedantic diagnostics even when those macros do
not use __extension__. (Tests verifying that would be a good idea.)
Joseph S. Myers