From: Nathan Sidwell <nathan@acm.org>
To: GCC Patches <gcc-patches@gcc.gnu.org>,
Jason Merrill <jason@redhat.com>,
Richard Biener <richard.guenther@gmail.com>,
David Edelsohn <dje.gcc@gmail.com>
Subject: [32/32] fixinclude
Date: Tue, 3 Nov 2020 16:18:52 -0500 [thread overview]
Message-ID: <9779964c-320a-59c9-3a5a-72186cbc6962@acm.org> (raw)
In-Reply-To: <f4bda23c-7fa1-5a1b-e970-9fae9b2575b6@acm.org>
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
AIX needed a fixinclude. It contained
typedef struct {...} *ptr;
that's an ODR landmine. Fixed by giving the struct a name
nathan
--
Nathan Sidwell
[-- Attachment #2: 32-aix-fixincl.diff --]
[-- Type: text/x-patch, Size: 3955 bytes --]
diff --git c/fixincludes/fixincl.x w/fixincludes/fixincl.x
index 758d5620641..21439652bce 100644
--- c/fixincludes/fixincl.x
+++ w/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed October 3, 2020 at 11:40:52 PM by AutoGen 5.18
+ * It has been AutoGen-ed October 21, 2020 at 10:43:22 AM by AutoGen 5.18.16
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Oct 3 23:40:52 UTC 2020
+/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Oct 21 10:43:22 EDT 2020
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 259 fixup descriptions.
+ * This file contains 260 fixup descriptions.
*
* See README for more information.
*
@@ -1247,6 +1247,43 @@ static const char* apzAix_Rwlock_Initializer_1Patch[] = {
{{ \\\n",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Aix_Physadr_T fix
+ */
+tSCC zAix_Physadr_TName[] =
+ "aix_physadr_t";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_Physadr_TList[] =
+ "sys/types.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAix_Physadr_TMachs[] = {
+ "*-*-aix*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAix_Physadr_TSelect0[] =
+ "typedef[ \t]*struct[ \t]*([{][^}]*[}][ \t]*\\*[ \t]*physadr_t;)";
+
+#define AIX_PHYSADR_T_TEST_CT 1
+static tTestDesc aAix_Physadr_TTests[] = {
+ { TT_EGREP, zAix_Physadr_TSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Physadr_T
+ */
+static const char* apzAix_Physadr_TPatch[] = {
+ "format",
+ "typedef struct __physadr_s %1",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aix_Pthread fix
@@ -10521,9 +10558,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 297
+#define REGEX_COUNT 298
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 259
+#define FIX_COUNT 260
/*
* Enumerate the fixes
@@ -10555,6 +10592,7 @@ typedef enum {
AIX_MUTEX_INITIALIZER_1_FIXIDX,
AIX_COND_INITIALIZER_1_FIXIDX,
AIX_RWLOCK_INITIALIZER_1_FIXIDX,
+ AIX_PHYSADR_T_FIXIDX,
AIX_PTHREAD_FIXIDX,
AIX_STDINT_1_FIXIDX,
AIX_STDINT_2_FIXIDX,
@@ -10921,6 +10959,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AIX_RWLOCK_INITIALIZER_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAix_Rwlock_Initializer_1Tests, apzAix_Rwlock_Initializer_1Patch, 0 },
+ { zAix_Physadr_TName, zAix_Physadr_TList,
+ apzAix_Physadr_TMachs,
+ AIX_PHYSADR_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_Physadr_TTests, apzAix_Physadr_TPatch, 0 },
+
{ zAix_PthreadName, zAix_PthreadList,
apzAix_PthreadMachs,
AIX_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git c/fixincludes/inclhack.def w/fixincludes/inclhack.def
index 47eb236586c..80c9adfb07c 100644
--- c/fixincludes/inclhack.def
+++ w/fixincludes/inclhack.def
@@ -720,6 +720,20 @@ fix = {
"{ \\\\\n";
};
+
+/* On AIX 'typedef struct {<stuff>} * physadr_t;' needs to give the struct a
+ name for linkage purposes. Fortunately it is on exactly one
+ line. */
+fix = {
+ hackname = aix_physadr_t;
+ mach = "*-*-aix*";
+ files = sys/types.h;
+ select = "typedef[ \t]*struct[ \t]*([{][^}]*[}][ \t]*\\*[ \t]*physadr_t;)";
+ c_fix = format;
+ c_fix_arg = "typedef struct __physadr_s %1";
+ test_text = "typedef struct __physadr_s {";
+};
+
/*
* pthread.h on AIX 4.3.3 tries to define a macro without whitspace
* which violates a requirement of ISO C.
next prev parent reply other threads:[~2020-11-03 21:18 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7fc9e868-3db9-4972-ed67-6ff249f549c3@acm.org>
2020-11-03 21:13 ` [01/32] langhooks Nathan Sidwell
2020-11-06 19:58 ` Jeff Law
[not found] ` <c14417b3-4286-d877-f6e2-925bfc754684@acm.org>
2020-11-03 19:39 ` [02/33] linemaps Nathan Sidwell
2020-11-03 21:13 ` [02/32] linemaps Nathan Sidwell
2020-11-06 20:10 ` Jeff Law
[not found] ` <0bdf00a8-d8ad-9e97-134d-6668c0e8c86b@acm.org>
2020-11-03 21:13 ` [03/32] cpp-callbacks Nathan Sidwell
2020-11-06 20:10 ` Jeff Law
[not found] ` <c55d12d9-e966-5b36-1538-98c9c4b418c8@acm.org>
2020-11-03 21:13 ` [04/32] cpp lexer Nathan Sidwell
2020-11-03 23:08 ` Joseph Myers
2020-11-03 23:21 ` Nathan Sidwell
2020-11-06 20:23 ` Jeff Law
2020-11-06 21:06 ` Nathan Sidwell
2020-11-09 6:15 ` Boris Kolpackov
2020-11-09 13:54 ` Nathan Sidwell
[not found] ` <85996243-86cf-88b4-5b3b-451eaf3a0df6@acm.org>
2020-11-03 21:14 ` [05/32] cpp files Nathan Sidwell
2020-11-17 1:27 ` Jeff Law
[not found] ` <ca22e13a-6869-bc48-d7c4-a04128f3fcb8@acm.org>
2020-11-03 21:14 ` [06/32] cpp macros Nathan Sidwell
2020-11-23 21:13 ` Jeff Law
[not found] ` <4d14b230-3263-9a13-3159-c4853f282761@acm.org>
2020-11-03 21:14 ` [07/32] cpp main Nathan Sidwell
2020-11-10 23:18 ` Jeff Law
[not found] ` <688bd28f-5998-0def-8c40-03b817832d63@acm.org>
2020-11-03 21:14 ` [08/32] cpp mkdeps Nathan Sidwell
2020-11-10 23:20 ` Jeff Law
[not found] ` <89819c10-e86d-9b01-5673-5223a525a135@acm.org>
[not found] ` <35879e15-d74a-c664-4d44-15f4b3783d77@acm.org>
2020-11-03 20:03 ` [09/33] core diagnostics Nathan Sidwell
2020-11-21 16:56 ` Jeff Law
2020-11-03 21:14 ` [11/32] instrumentation Nathan Sidwell
2020-11-06 20:28 ` Jeff Law
[not found] ` <9ae23c4c-67a5-a267-c939-5a96e9488612@acm.org>
2020-11-03 21:15 ` [12/32] user documentation Nathan Sidwell
2020-11-25 19:17 ` Jeff Law
[not found] ` <c1c50ae5-44d5-4b2d-dba8-76b459b7d994@acm.org>
2020-11-03 21:15 ` [13/32] new options Nathan Sidwell
2020-11-25 19:27 ` Jeff Law
[not found] ` <c0a0b999-f96e-177c-b393-9eaf8d1aa520@acm.org>
2020-11-03 21:15 ` [14/32] new keywords Nathan Sidwell
2020-11-06 20:29 ` Jeff Law
[not found] ` <6666545b-0583-4812-4745-d51994465818@acm.org>
2020-11-03 21:15 ` [15/32] new C++ lexer Nathan Sidwell
[not found] ` <d6ae6a29-0da0-06a5-d86c-1b0dd4bd96e4@acm.org>
2020-11-03 21:15 ` [16/32] new C++ infrastructure Nathan Sidwell
[not found] ` <d3149435-8b5e-7c79-f4bb-80238fdfcf72@acm.org>
2020-11-03 21:15 ` [17/32] new C++ constexpr bits Nathan Sidwell
[not found] ` <1ab99df5-3997-0895-c979-f8529f476df7@acm.org>
2020-11-03 21:16 ` [18/32] new C++ template bits Nathan Sidwell
[not found] ` <97e9477b-7173-b7f9-a884-616b972c57ba@acm.org>
2020-11-03 21:16 ` [19/32] global trees Nathan Sidwell
2020-11-06 20:29 ` Jeff Law
[not found] ` <01f091a5-cd8b-60b6-9552-2318ecd07025@acm.org>
2020-11-03 21:16 ` [20/32] global constructor Nathan Sidwell
[not found] ` <a70c9177-136e-0d52-1c96-c8093588f57b@acm.org>
2020-11-03 21:16 ` [21/32] miscelaneous Nathan Sidwell
2020-11-05 13:30 ` Richard Biener
2020-11-06 17:08 ` Nathan Sidwell
[not found] ` <5c533ebe-440d-188e-5bdb-38c14898852c@acm.org>
2020-11-03 21:16 ` [22/32] miscelaneous c++ bits Nathan Sidwell
2020-11-13 13:41 ` Nathan Sidwell
2020-11-13 14:03 ` [22.2/32] module flags Nathan Sidwell
2020-11-13 14:27 ` Richard Biener
2020-11-13 16:25 ` Nathan Sidwell
[not found] ` <9e6ec23c-6b36-de70-7630-55562583696f@acm.org>
2020-11-03 21:17 ` [23/32] libcody Nathan Sidwell
[not found] ` <c839f3f8-9ce6-0c28-b981-d81f236a3a34@acm.org>
2020-11-03 21:17 ` [24/32] module mapper Nathan Sidwell
2020-11-09 6:42 ` Boris Kolpackov
2020-11-09 15:39 ` Nathan Sidwell
2020-11-24 7:18 ` Boris Kolpackov
2020-11-12 16:24 ` Nathan Sidwell
2020-11-30 16:18 ` Jeff Law
[not found] ` <efe68976-5562-ef6a-7e86-b1daeae73670@acm.org>
2020-11-03 21:17 ` [25/32] modules! Nathan Sidwell
2020-11-04 12:48 ` Nathan Sidwell
[not found] ` <3d138aa4-df19-df5d-54c6-ec7299749f0f@acm.org>
2020-11-03 21:17 ` [26/33] name-lookup Nathan Sidwell
[not found] ` <df8d76cf-b00f-6b4c-3b8c-132843c15d62@acm.org>
2020-11-03 21:17 ` [27/32] parser Nathan Sidwell
[not found] ` <e67492d5-3be5-0993-538d-b798875c5e89@acm.org>
2020-11-03 21:17 ` [28/32] lang hook implementation Nathan Sidwell
[not found] ` <b378cdb3-fe6f-956a-84a1-23af87ce6695@acm.org>
2020-11-03 21:18 ` [29/32] make-lang.in Nathan Sidwell
[not found] ` <bedd1f52-8a2c-b257-74bc-caf0cc1d0589@acm.org>
2020-11-03 21:18 ` [30/32] test harness Nathan Sidwell
2020-11-06 20:30 ` Jeff Law
[not found] ` <0a62f316-7c23-3492-f7c3-9c1653a61a75@acm.org>
2020-11-03 21:18 ` [31/32] test suite Nathan Sidwell
[not found] ` <f4bda23c-7fa1-5a1b-e970-9fae9b2575b6@acm.org>
2020-11-03 21:18 ` Nathan Sidwell [this message]
2020-11-04 0:04 ` [32/32] fixinclude David Edelsohn
2020-11-18 18:36 ` Nathan Sidwell
2020-11-03 21:14 ` [09/32] core diagnostics Nathan Sidwell
2020-11-21 16:57 ` Jeff Law
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=9779964c-320a-59c9-3a5a-72186cbc6962@acm.org \
--to=nathan@acm.org \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=richard.guenther@gmail.com \
/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).