From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 495BA1F453 for ; Fri, 3 May 2019 17:58:40 +0000 (UTC) Received: from localhost ([127.0.0.1]:45426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMcSF-0006PT-2b for normalperson@yhbt.net; Fri, 03 May 2019 13:58:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMcSA-0006PN-QD for bug-gnulib@gnu.org; Fri, 03 May 2019 13:58:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMcS9-0006fv-0I for bug-gnulib@gnu.org; Fri, 03 May 2019 13:58:34 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59884) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMcS7-0006do-Eu for bug-gnulib@gnu.org; Fri, 03 May 2019 13:58:32 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CBF8A161937 for ; Fri, 3 May 2019 10:58:28 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ToAt3NDeuTU3; Fri, 3 May 2019 10:58:27 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 89312161925; Fri, 3 May 2019 10:58:27 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5EuOKeIZTzn9; Fri, 3 May 2019 10:58:27 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 6C47E16180D; Fri, 3 May 2019 10:58:27 -0700 (PDT) From: Paul Eggert To: bug-gnulib@gnu.org Subject: [PATCH] Port manywarnings to GCC 9 Date: Fri, 3 May 2019 10:58:22 -0700 Message-Id: <20190503175822.18364-1-eggert@cs.ucla.edu> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Eggert Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" * build-aux/gcc-warning.spec: Sort. Add -Wattribute-alias, -Wc11-c2x-compat, -Wcast-result (for the D programming language), -Wclass-conversion, -Wdeprecated-copy, -Wdeprecated-copy-dtor, -Winit-list-lifetime, -Wpessimizing-move, -Wprio-ctor-dtor, -Wredundant-move. Adjust to minor wording changes in GCC 9=E2=80=99s --help=3Dwarnings output. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wabsolute-value, -Waddress-of-packed-member, -Wattribute-warning, -Wcannot-profile, -Wmissing-profile. Change -Wattribute-alias to -Wattribute-alias=3D2. --- ChangeLog | 13 +++++++++++++ build-aux/gcc-warning.spec | 32 +++++++++++++++++++++++--------- m4/manywarnings.m4 | 9 +++++++-- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf4116bf3..92aa64a4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2019-05-03 Paul Eggert + + Port manywarnings to GCC 9 + * build-aux/gcc-warning.spec: Sort. Add -Wattribute-alias, + -Wc11-c2x-compat, -Wcast-result (for the D programming language), + -Wclass-conversion, -Wdeprecated-copy, -Wdeprecated-copy-dtor, + -Winit-list-lifetime, -Wpessimizing-move, -Wprio-ctor-dtor, + -Wredundant-move. Adjust to minor wording changes in GCC 9=E2=80=99s + --help=3Dwarnings output. + * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wabsolute-value, + -Waddress-of-packed-member, -Wattribute-warning, -Wcannot-profile, + -Wmissing-profile. Change -Wattribute-alias to -Wattribute-alias=3D2. + 2019-04-30 Paul Eggert =20 Sync lib/mktime-internal.h from glibc diff --git a/build-aux/gcc-warning.spec b/build-aux/gcc-warning.spec index 8c0a3dc75..723d287af 100644 --- a/build-aux/gcc-warning.spec +++ b/build-aux/gcc-warning.spec @@ -1,23 +1,25 @@ # options to filter out, and why --all-warnings alias for -Wall --extra-warnings alias for -Wextra +-Wabi this is now a no-op -Wabi-tag c++ -Wabi=3D c++ --Wabi this is now a no-op -Waggregate-return obsolescent -Waliasing fortran -Walign-commons fortran -Waligned-new=3D[none|global|all] c++ --Walloca we like alloca in small doses --Walloca-larger-than=3D FIXME: choose something sane? -Walloc-size-larger-than=3D handled specially by gl_MANYWARN_ALL_GCC -Walloc-zero Gnulib fixes this problem +-Walloca we like alloca in small doses +-Walloca-larger-than=3D FIXME: choose something sane? -Wampersand fortran -Wargument-mismatch fortran -Warray-bounds covered by -Warray-bounds=3D -Warray-bounds=3D<0,2> handled specially by gl_MANYWARN_ALL_GCC -Warray-temporaries fortran -Wassign-intercept objc/objc++ +-Wattribute-alias covered by -Wattribute-alias=3D2 +-Wattribute-alias=3D<0,2> handled specially by gl_MANYWARN_ALL_GCC -Wc++-compat only useful for code meant to be compiled by a C++ compi= ler -Wc++0x-compat c++ -Wc++11-compat c++ @@ -25,13 +27,16 @@ -Wc++17-compat c++ -Wc++1z-compat c++ -Wc-binding-type fortran +-Wc11-c2x-compat c compatibility -Wc90-c99-compat c compatibility -Wc99-c11-compat c compatibility -Wcast-qual FIXME maybe? too much noise; encourages bad changes +-Wcast-result D -Wcatch-value c++ -Wcatch-value=3D<0,3> c++ -Wcharacter-truncation fortran -Wchkp deprecated +-Wclass-conversion c++ and objc++ -Wclass-memaccess c++ -Wcompare-reals fortran -Wconditionally-supported c++ and objc++ @@ -42,6 +47,8 @@ -Wdeclaration-after-statement FIXME: do not want. others may -Wdelete-incomplete c++ and objc++ -Wdelete-non-virtual-dtor c++ +-Wdeprecated-copy c++ and objc++ +-Wdeprecated-copy-dtor c++ and objc++ -Wdo-subscript fortran -Weffc++ c++ -Werror-implicit-function-declaration deprecated @@ -49,25 +56,26 @@ -Wfloat-conversion FIXME maybe? borderline. some will want this -Wfloat-equal FIXME maybe? borderline. some will want this -Wformat covered by -Wformat=3D2 --Wformat=3D<0,2> gcc --help=3Dwarnings artifact -Wformat-overflow<0,2> gcc --help=3Dwarnings artifact -Wformat-overflow=3D<0,2> handled specially by gl_MANYWARN_ALL_GCC -Wformat-truncation covered by -Wformat-truncation=3D2 -Wformat-truncation=3D<0,2> handled specially by gl_MANYWARN_ALL_GCC --Wframe-larger-than=3D FIXME: choose something sane? +-Wformat=3D<0,2> gcc --help=3Dwarnings artifact +-Wframe-larger-than=3D FIXME: choose something sane? -Wfunction-elimination fortran -Wimplicit-fallthrough covered by -Wimplicit-fallthrough=3D2 -Wimplicit-fallthrough=3D<0,5> handled specially by gl_MANYWARN_ALL_GCC -Wimplicit-interface fortran -Wimplicit-procedure fortran -Winherited-variadic-ctor c++ +-Winit-list-lifetime c++ and objc++ -Winteger-division fortran -Wintrinsic-shadow fortran -Wintrinsics-std fortran -Winvalid-offsetof c++ and objc++ -Wjump-misses-init only useful for code meant to be compiled by a C++ = compiler -Wlarger-than- gcc --help=3Dwarnings artifact --Wlarger-than=3D FIXME: choose something sane? +-Wlarger-than=3D FIXME: choose something sane? -Wline-truncation fortran -Wliteral-suffix c++ and objc++ -Wlong-long obsolescent @@ -76,6 +84,9 @@ -Wmissing-noreturn obsolescent -Wmultiple-inheritance c++ and objc++ -Wnamespaces c++ +-Wno-alloc-size-larger-than see -Walloc-size-larger-than +-Wno-alloca-larger-than see -Walloca-larger-than +-Wno-vla-larger-than see -Wvla-larger-than -Wnoexcept c++ -Wnoexcept-type c++ -Wnon-template-friend c++ @@ -87,31 +98,34 @@ -Woverride-init-side-effects c++ and objc++ -Wpadded FIXME maybe? warns about "stabil" member in /usr/include/bi= ts/timex.h -Wpedantic FIXME: too strict? +-Wpessimizing-move c++ and objc++ -Wplacement-new c++ -Wplacement-new=3D<0,2> c++ -Wpmf-conversions c++ and objc++ +-Wprio-ctor-dtor c++ -Wproperty-assign-default objc++ -Wprotocol objc++ -Wreal-q-constant fortran -Wrealloc-lhs fortran -Wrealloc-lhs-all fortran -Wredundant-decls FIXME maybe? many _gl_cxxalias_dummy FPs +-Wredundant-move c++ and objc++ -Wregister c++ and objc++ -Wreorder c++ and objc++ -Wselector objc and objc++ +-Wshadow-compatible-local covered by -Wshadow -Wshadow-ivar objc +-Wshadow-local covered by -Wshadow -Wshadow=3Dcompatible-local covered by -Wshadow --Wshadow-compatible-local covered by -Wshadow -Wshadow=3Dglobal covered by -Wshadow -Wshadow=3Dlocal covered by -Wshadow --Wshadow-local covered by -Wshadow -Wshift-overflow covered by -Wshift-overflow=3D2 -Wshift-overflow=3D<0,2> gcc --help=3Dwarnings artifact -Wsign-compare FIXME maybe? borderline. some will want this -Wsign-conversion FIXME maybe? borderline. some will want this -Wsign-promo c++ and objc++ -Wsized-deallocation c++ and objc++ --Wstack-usage=3D FIXME: choose something sane? +-Wstack-usage=3D FIXME: choose something sane? -Wstrict-aliasing=3D<0,3> FIXME: choose something sane? -Wstrict-null-sentinel c++ and objc++ -Wstrict-overflow=3D<0,5> FIXME: choose something sane? diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4 index e0488a5cb..6bb9f8f84 100644 --- a/m4/manywarnings.m4 +++ b/m4/manywarnings.m4 @@ -1,4 +1,4 @@ -# manywarnings.m4 serial 17 +# manywarnings.m4 serial 18 dnl Copyright (C) 2008-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -112,16 +112,19 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)], gl_manywarn_set=3D for gl_manywarn_item in -fno-common \ -W \ + -Wabsolute-value \ -Waddress \ + -Waddress-of-packed-member \ -Waggressive-loop-optimizations \ -Wall \ - -Wattribute-alias \ + -Wattribute-warning \ -Wattributes \ -Wbad-function-cast \ -Wbool-compare \ -Wbool-operation \ -Wbuiltin-declaration-mismatch \ -Wbuiltin-macro-redefined \ + -Wcannot-profile \ -Wcast-align \ -Wcast-align=3Dstrict \ -Wcast-function-type \ @@ -186,6 +189,7 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)], -Wmissing-field-initializers \ -Wmissing-include-dirs \ -Wmissing-parameter-type \ + -Wmissing-profile \ -Wmissing-prototypes \ -Wmultichar \ -Wmultistatement-macros \ @@ -292,6 +296,7 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)], AC_MSG_RESULT([$gl_alloc_max]) gl_manywarn_set=3D"$gl_manywarn_set -Walloc-size-larger-than=3D$gl_all= oc_max" gl_manywarn_set=3D"$gl_manywarn_set -Warray-bounds=3D2" + gl_manywarn_set=3D"$gl_manywarn_set -Wattribute-alias=3D2" gl_manywarn_set=3D"$gl_manywarn_set -Wformat-overflow=3D2" gl_manywarn_set=3D"$gl_manywarn_set -Wformat-truncation=3D2" gl_manywarn_set=3D"$gl_manywarn_set -Wimplicit-fallthrough=3D5" --=20 2.21.0