[C++0x] pedantic warning with 'alignof(expression)'
Jason Merrill
jason@redhat.com
Tue Dec 21 15:20:00 GMT 2010
On 12/01/2010 11:25 AM, Rodrigo Rivas wrote:
> Hmm, I was doing that when I noted the following:
> 1. cp_parser_allow_gnu_extensions_p always returns true, as the
> comment say, for now.
> 2. -std=gnu++0x vs. -std=c++0x differ flag_no_gnu_keywords,
> flag_no_gnu_builtin and flag_iso only, none of them are used in
> parser.c.
> 3. Other GNU extensions with pedantic warnings use the following pattern:
>
> if (cp_parser_allow_gnu_extensions_p (parser))
> {
> pedwarn (input_location, OPT_pedantic,
> "ISO C++ does not allow this or that");
> /* do it the GNU way */
> }
>
> Shouldn't this be done similarly?
Good points, let's handle this the same way.
Jason
More information about the Gcc-patches
mailing list