This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c-family PATCH to improve and simplify -Wmultistatement-macros (PR c/81448, c/81306)
- From: Steve Ellcey <sellcey at cavium dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Malcolm <dmalcolm at redhat dot com>
- Date: Wed, 02 Aug 2017 10:16:54 -0700
- Subject: Re: c-family PATCH to improve and simplify -Wmultistatement-macros (PR c/81448, c/81306)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve dot Ellcey at cavium dot com;
- References: <20170727144420.GK3397@redhat.com> <alpine.DEB.2.20.1708021135150.19718@digraph.polyomino.org.uk>
- Reply-to: sellcey at cavium dot com
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Wed, 2017-08-02 at 11:37 +0000, Joseph Myers wrote:
> On Thu, 27 Jul 2017, Marek Polacek wrote:
>
> >
> > Bootstrapped/regtested on x86_64-linux and ppc64le-linux, ok for
> > trunk?
> >
> > 2017-07-27 Marek Polacek <polacek@redhat.com>
> >
> > PR c/81448
> > PR c/81306
> > * c-warn.c (warn_for_multistatement_macros): Prevent bogus
> > warnings. Avoid walking MACRO_MAP_LOCATIONS.
> >
> >
> > * c-c++-common/Wmultistatement-macros-13.c: New test.
> OK. Steve, as I noted in
> <https://sourceware.org/ml/libc-alpha/2017-07/msg00942.html>, please see
> if this means you no longer need to use -Wno-multistatement-macros for
> certain glibc tests (if it's still needed, that suggests another related
> problem may still be present).
I have built and tested the latest glibc with the latest gcc and after
removing the warnings from the Makefile, everything ran fine. There
were no build problems.
Since the mainline is now open I will go ahead and check in this patch.
Steve Ellcey
sellcey@cavium.com
2017-08-02 Steve Ellcey <sellcey@cavium.com>
* localedata/Makefile (CFLAGS-tst_iswalnum.c, CFLAGS-tst_iswalpha.c
CFLAGS-tst_iswcntrl.c, CFLAGS-tst_iswdigit.c, CFLAGS-tst_iswgraph.c,
CFLAGS-tst_iswlower.c, CFLAGS-tst_iswprint.c, CFLAGS-tst_iswpunct.c,
CFLAGS-tst_iswspace.c, CFLAGS-tst_iswupper.c, CFLAGS-tst_iswxdigit.c,
CFLAGS-tst_towlower.c, CFLAGS-tst_towupper.c): Remove.
diff --git a/localedata/Makefile b/localedata/Makefile
index 20c5921..9db9464 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -122,22 +122,6 @@ $(inst_i18ndir)/charmaps/%.gz: charmaps/% $(+force)
# Install the locale source files in the appropriate directory.
$(inst_i18ndir)/locales/%: locales/% $(+force); $(do-install)
-# These tests use multistatement macros from tests-mbwc/tst_funcs.h
-# and will not compile with GCC 8.1 without the warning turned off.
-CFLAGS-tst_iswalnum.c = -Wno-multistatement-macros
-CFLAGS-tst_iswalpha.c = -Wno-multistatement-macros
-CFLAGS-tst_iswcntrl.c = -Wno-multistatement-macros
-CFLAGS-tst_iswdigit.c = -Wno-multistatement-macros
-CFLAGS-tst_iswgraph.c = -Wno-multistatement-macros
-CFLAGS-tst_iswlower.c = -Wno-multistatement-macros
-CFLAGS-tst_iswprint.c = -Wno-multistatement-macros
-CFLAGS-tst_iswpunct.c = -Wno-multistatement-macros
-CFLAGS-tst_iswspace.c = -Wno-multistatement-macros
-CFLAGS-tst_iswupper.c = -Wno-multistatement-macros
-CFLAGS-tst_iswxdigit.c = -Wno-multistatement-macros
-CFLAGS-tst_towlower.c = -Wno-multistatement-macros
-CFLAGS-tst_towupper.c = -Wno-multistatement-macros
-
ifeq ($(run-built-tests),yes)
generated-dirs += $(LOCALES)