summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-02 23:01:49 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-02 23:01:49 +0000
commit8f1baf26b5af84f3550beb22de1eecf6b877b428 (patch)
treef05c9cb70fc53cb5f980a6f50cd54d2536ef4cd6 /fixincludes
parent2701a3fd770a28bf33d81dfca6ba47b163c38023 (diff)
downloadlinaro-gcc-8f1baf26b5af84f3550beb22de1eecf6b877b428.tar.gz
linaro-gcc-8f1baf26b5af84f3550beb22de1eecf6b877b428.tar.bz2
linaro-gcc-8f1baf26b5af84f3550beb22de1eecf6b877b428.zip
* inclhack.def (aix_assert): New fix.
* fixincl.x: Regenerate. * tests/base/assert.h [AIX_ASSERT_CHECK]: New check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202192 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog6
-rw-r--r--fixincludes/fixincl.x59
-rw-r--r--fixincludes/inclhack.def14
-rw-r--r--fixincludes/tests/base/assert.h7
4 files changed, 79 insertions, 7 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 8471e027f89..4a9d22997ff 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,9 @@
+2013-09-02 David Edelsohn <dje.gcc@gmail.com>
+
+ * inclhack.def (aix_assert): New fix.
+ * fixincl.x: Regenerate.
+ * tests/base/assert.h [AIX_ASSERT_CHECK]: New check.
+
2013-07-06 Bruce Korb <bkorb@gnu.org>
* inclhack.def (cdef_cplusplus): removed, per Bug 51776
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 1fbe3fa0e0c..eb2ee648fba 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -1,12 +1,12 @@
/* -*- buffer-read-only: t -*- vi: set ro:
- *
+ *
* DO NOT EDIT THIS FILE (fixincl.x)
- *
- * It has been AutoGen-ed July 6, 2013 at 10:40:53 AM by AutoGen 5.17.5pre10
+ *
+ * It has been AutoGen-ed August 31, 2013 at 04:29:02 PM by AutoGen 5.12
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jul 6 10:40:53 PDT 2013
+/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Aug 31 16:29:02 PDT 2013
*
* 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 227 fixup descriptions.
+ * This file contains 228 fixup descriptions.
*
* See README for more information.
*
@@ -736,6 +736,45 @@ static const char* apzAab_Vxworks_UnistdPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Aix_Assert fix
+ */
+tSCC zAix_AssertName[] =
+ "aix_assert";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_AssertList[] =
+ "assert.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAix_AssertMachs[] = {
+ "*-*-aix*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAix_AssertSelect0[] =
+ "#define[ \t]static_assert[ \t]_Static_assert";
+
+#define AIX_ASSERT_TEST_CT 1
+static tTestDesc aAix_AssertTests[] = {
+ { TT_EGREP, zAix_AssertSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Assert
+ */
+static const char* apzAix_AssertPatch[] = {
+ "format",
+ "#ifndef __cplusplus\n\
+%0\n\
+#endif",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Aix_Complex fix
*/
tSCC zAix_ComplexName[] =
@@ -9329,9 +9368,9 @@ static const char* apzComplier_H_TradcppPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 266
+#define REGEX_COUNT 267
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 227
+#define FIX_COUNT 228
/*
* Enumerate the fixes
@@ -9349,6 +9388,7 @@ typedef enum {
AAB_VXWORKS_REGS_VXTYPES_FIXIDX,
AAB_VXWORKS_STDINT_FIXIDX,
AAB_VXWORKS_UNISTD_FIXIDX,
+ AIX_ASSERT_FIXIDX,
AIX_COMPLEX_FIXIDX,
AIX_MALLOC_FIXIDX,
AIX_NET_IF_ARP_FIXIDX,
@@ -9627,6 +9667,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AAB_VXWORKS_UNISTD_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAab_Vxworks_UnistdTests, apzAab_Vxworks_UnistdPatch, 0 },
+ { zAix_AssertName, zAix_AssertList,
+ apzAix_AssertMachs,
+ AIX_ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_AssertTests, apzAix_AssertPatch, 0 },
+
{ zAix_ComplexName, zAix_ComplexList,
apzAix_ComplexMachs,
AIX_COMPLEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index c92170f4cd9..996356a3930 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -569,6 +569,20 @@ fix = {
};
/*
+ * assert.h on AIX 7 redefines static_assert as _Static_assert without
+ * protecting C++.
+ */
+fix = {
+ hackname = aix_assert;
+ mach = "*-*-aix*";
+ files = assert.h;
+ select = "#define[ \t]static_assert[ \t]_Static_assert";
+ c_fix = format;
+ c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
+ test_text = "#define static_assert _Static_assert";
+};
+
+/*
* complex.h on AIX 5 and AIX 6 define _Complex_I and I in terms of __I,
* which only is provided by AIX xlc C99.
*/
diff --git a/fixincludes/tests/base/assert.h b/fixincludes/tests/base/assert.h
index 2642cbe49c4..19dc52575ee 100644
--- a/fixincludes/tests/base/assert.h
+++ b/fixincludes/tests/base/assert.h
@@ -19,6 +19,13 @@
#include <stdio.h>
+#if defined( AIX_ASSERT_CHECK )
+#ifndef __cplusplus
+#define static_assert _Static_assert
+#endif
+#endif /* AIX_ASSERT_CHECK */
+
+
#if defined( ALPHA___ASSERT_CHECK )
extern void __assert(const char *, const char *, int);
#endif /* ALPHA___ASSERT_CHECK */