On Tue, 10 Jun 2008, Vincent Lefevre wrote:

> On 2008-06-09 16:02:05 +0200, Richard Guenther wrote:
> > Use -pedantic to warn about extensions. It doesn't make sense to
> > warn for extensions if they are not deprecated. After all they are
> > extensions.
> 
> The problem with -pedantic is that it gives lots of spurious warnings.
> We have code that uses useful (i.e. with no workarounds) extensions
> and that is protected by #if, e.g.
> 
> #ifdef HAVE_LONG_LONG
>             case LONG_LONG_ARG:
>               *(long long *) p = (long long) nchar;
>               break;
> #endif

For this particular extension, you can use the more specific warning 
-Wpointer-arith.

There was a discussion of possible changes that would facilitate better 
warning control for -pedantic and pedwarns 
<http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00970.html>.  You could then 
more simply add additional options for fine-grained control of particular 
-pedantic pedwarns.

-- 
Joseph S. Myers
[EMAIL PROTECTED]

Reply via email to