This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR libstdc++/79789 fix non-reserved names in headers
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 14 Mar 2017 23:14:29 +0000
- Subject: Re: [PATCH] PR libstdc++/79789 fix non-reserved names in headers
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnymjGP5ZpP3e4O-=3K17D=OK1Uda5ixOL_mwmv=hEgxBkw@mail.gmail.com> <20170309194616.GG3501@redhat.com> <20170310152017.GR3501@redhat.com>
On 10/03/17 15:20 +0000, Jonathan Wakely wrote:
On 09/03/17 19:46 +0000, Jonathan Wakely wrote:
On 03/03/17 10:47 -0500, David Edelsohn wrote:
This patch caused a new regression on AIX.
I'm unable to bootstrap on either gcc111 or gcc119 so I can't test
the fix.
export CONFIG_SHELL=/usr/bin/bash
PATH=/opt/freeware/bin:$PATH
$gccsrcdir/configure ... --disable-werror --with-included-gettext --with-gmp=/opt/cfarm --with-libiconv-prefix=/opt/cfarm --disable-libstdcxx-pch
Here's what I'm committing to trunk.
Tested powerpc64le-linux and powerpc-ibm-aix7.2.0.0
Also committed to gcc-5-branch and gcc-6-branch.
commit 5e390a2874a9629c13eaddb76f82a66f0634a864
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Mar 10 13:14:33 2017 +0000
Fix libstdc++ reserved names test to pass on AIX
* testsuite/17_intro/names.cc: Undefine macros that clash with
identifiers in AIX system headers.
diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc
index a7d9a6b..c525861 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -98,4 +98,13 @@
#define x (
#define y (
#define z (
+
+#ifdef _AIX
+// See https://gcc.gnu.org/ml/libstdc++/2017-03/msg00015.html
+#undef f
+#undef r
+#undef x
+#undef y
+#endif
+
#include <bits/stdc++.h>