From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8628 invoked by alias); 7 Apr 2012 22:58:47 -0000 Received: (qmail 8620 invoked by uid 22791); 7 Apr 2012 22:58:46 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ob0-f175.google.com (HELO mail-ob0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 07 Apr 2012 22:58:33 +0000 Received: by obbuo13 with SMTP id uo13so4825185obb.20 for ; Sat, 07 Apr 2012 15:58:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.51.73 with SMTP id i9mr3708424obo.17.1333839512933; Sat, 07 Apr 2012 15:58:32 -0700 (PDT) Received: by 10.182.92.168 with HTTP; Sat, 7 Apr 2012 15:58:32 -0700 (PDT) In-Reply-To: <4F80C2A6.7030007@gmail.com> References: <4F7D5EB4.2060903@redhat.com> <4F80C2A6.7030007@gmail.com> Date: Sat, 07 Apr 2012 22:58:00 -0000 Message-ID: Subject: Re: RFC: -Wall by default From: Gabriel Dos Reis To: Dave Korn Cc: Richard Guenther , Pedro Alves , gcc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg00233.txt.bz2 On Sat, Apr 7, 2012 at 5:41 PM, Dave Korn wrot= e: > On 05/04/2012 10:46, Gabriel Dos Reis wrote: >> On Thu, Apr 5, 2012 at 4:39 AM, Richard Guenther >> 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: > > =A0Your list seems a bit short, here's what today's trunk build says for = -Wall: Thank you Dave for the correction. > >> -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=3D1 >> -Wswitch >> -Wtrigraphs >> -Wuninitialized >> -Wunknown-pragmas >> -Wunused-function >> -Wunused-label >> -Wunused-value >> -Wunused-variable >> -Wvolatile-register-var > > =A0IMHO we should move the -Wunused ones into -Wextra if we're going to t= urn on > -Wall by default. =A0The rest seem pretty reasonable defaults to me. Even if we do not turn on -Wall by default, do you think we should have -Wunused in -Wall? -- Gaby