From: Jonathan Wakely <jwakely@redhat.com>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>,
"libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] PR libstdc++/79789 fix non-reserved names in headers
Date: Tue, 07 Mar 2017 12:26:00 -0000 [thread overview]
Message-ID: <20170307122609.GA3501@redhat.com> (raw)
In-Reply-To: <CAGWvnymjGP5ZpP3e4O-=3K17D=OK1Uda5ixOL_mwmv=hEgxBkw@mail.gmail.com>
On 03/03/17 10:47 -0500, David Edelsohn wrote:
>This patch caused a new regression on AIX.
>
>- David
>
>FAIL: 17_intro/names.cc (test for excess errors)
>Excess errors:
>/tmp/GCC/gcc/include-fixed/sys/types.h:600: error: expected
>unqualified-id before '[' token
>/tmp/GCC/gcc/include-fixed/sys/types.h:600: error: expected ')' before '[' token
>/tmp/GCC/gcc/include-fixed/sys/types.h:668: error: expected
>unqualified-id before '[' token
>/tmp/GCC/gcc/include-fixed/sys/types.h:668: error: expected ')' before '[' token
>/tmp/GCC/gcc/include-fixed/stdlib.h:332: error: 'parameter' declared
>as function returning a function
>/tmp/GCC/gcc/include-fixed/stdlib.h:332: error: expected
>primary-expression before 'void'
>/tmp/GCC/gcc/include-fixed/math.h:1458: error: expected unqualified-id
>before ',' token
>/tmp/GCC/gcc/include-fixed/math.h:1458: error: expected ')' before ',' token
>
>AIX types.h:600 is
>
>typedef struct { int r[1]; } * physadr_t;
>
>stdlib.h:332 is
>
> extern int at_quick_exit(void (*f)(void));
>
>math.h:1458 is
>
> struct dbl_hypot {
> double x, y;
> };
I think the AIX headers should be using reserved names there, but this
should fix it:
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -55,7 +55,9 @@
// <queue> and <stack> defined data members called c
#define d (
#define e (
+#ifndef _AIX
#define f (
+#endif
#define g (
#if __cplusplus >= 201402L
// <chrono> defines operator ""h in C++14
@@ -84,7 +86,9 @@
#define p (
#endif
#define q (
+#ifndef _AIX
#define r (
+#endif
#if __cplusplus >= 201103L
// <random> defines member functions called s() and t()
// <chrono> and <string> define operator ""s in C++14
@@ -95,7 +99,9 @@
#define u (
#define v (
#define w (
+#ifndef _AIX
#define x (
#define y (
+#endif
#define z (
#include <bits/stdc++.h>
I'll test it later today.
next prev parent reply other threads:[~2017-03-07 12:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 15:47 David Edelsohn
2017-03-07 12:26 ` Jonathan Wakely [this message]
2017-03-09 19:46 ` Jonathan Wakely
2017-03-10 15:20 ` Jonathan Wakely
2017-03-10 16:11 ` David Edelsohn
2017-03-14 23:14 ` Jonathan Wakely
-- strict thread matches above, loose matches on Subject: below --
2017-03-02 5:25 Jonathan Wakely
2017-03-02 18:59 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170307122609.GA3501@redhat.com \
--to=jwakely@redhat.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwakely.gcc@gmail.com \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).