This is the mail archive of the gcc@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: RFC: -Wall by default


On 05/04/2012 10:46, Gabriel Dos Reis wrote:
> On Thu, Apr 5, 2012 at 4:39 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
> 
>> Btw, it would be more reasonable to enable a subset of warnings that
>> we enable at -Wall by default.
> 
> Which ones for example?
> 
> Here is a (partial) list:

  Your list seems a bit short, here's what today's trunk build says for -Wall:

> -Waddress
> -Warray-bounds (only with `-O2')
> -Wc++11-compat
> -Wchar-subscripts
> -Wenum-compare (in C/Objc; this is on by default in C++)
> -Wimplicit-int (C and Objective-C only)
> -Wimplicit-function-declaration (C and Objective-C only)
> -Wcomment
> -Wformat
> -Wmain (only for C/ObjC and unless `-ffreestanding')
> -Wmaybe-uninitialized
> -Wmissing-braces
> -Wnonnull
> -Wparentheses
> -Wpointer-sign
> -Wreorder
> -Wreturn-type
> -Wsequence-point
> -Wsign-compare (only in C++)
> -Wstrict-aliasing
> -Wstrict-overflow=1
> -Wswitch
> -Wtrigraphs
> -Wuninitialized
> -Wunknown-pragmas
> -Wunused-function
> -Wunused-label
> -Wunused-value
> -Wunused-variable
> -Wvolatile-register-var

  IMHO we should move the -Wunused ones into -Wextra if we're going to turn on
-Wall by default.  The rest seem pretty reasonable defaults to me.

    cheers,
      DaveK


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