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] Diagnose predefined identifiers in pedantic mode


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
joseph@codesourcery.com


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