aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2017-02-25 20:29:39 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2017-02-25 20:29:39 +0000
commit888339e6484b40591bbc9728eb2c0228715889c1 (patch)
tree5847574d05767a1bd083219a3b0fcac1c6b1f19d /fixincludes/inclhack.def
parentcb3d24f1c34d7dfd7127272a1d70cc1a24327e57 (diff)
downloadgcc-888339e6484b40591bbc9728eb2c0228715889c1.zip
gcc-888339e6484b40591bbc9728eb2c0228715889c1.tar.gz
gcc-888339e6484b40591bbc9728eb2c0228715889c1.tar.bz2
re PR target/68739 (FAIL: 30_threads/call_once/constexpr.cc (test for excess errors))
PR target/68739 * inclhack.def (hpux11_pthread_pointer): New fix. (hpux11_pthread_const): Adjust to remove void * cast from define. * fixincl.x: Regenerate. From-SVN: r245740
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def24
1 files changed, 21 insertions, 3 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index fd12062..8a5514f 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -2366,16 +2366,34 @@ fix = {
};
/*
- * Fix C99 constant in __POINTER_SET define.
+ * The definitions for PTHREAD_MUTEX_INITIALIZER and similar initializers
+ * in pthread.h need to be constant expressions to be standard complient.
+ * As a result, we need to remove the void * casts in the initializers
+ * (see hpux11_pthread_const) and to change the __(M|C|RW)POINTER defines
+ * to use the long type.
+ */
+fix = {
+ hackname = hpux11_pthread_pointer;
+ mach = "*-hp-hpux11.[0-3]*";
+ files = sys/pthread.h;
+ select = "(void[ \t]*\\*)(m|c|rw)(_ptr)";
+
+ c_fix = format;
+ c_fix_arg = "long\t%2%3";
+ test_text = "#define __MPOINTER\t\tvoid\t *m_ptr";
+};
+
+/*
+ * Remove void pointer cast and fix C99 constant in __POINTER_SET defines.
*/
fix = {
hackname = hpux11_pthread_const;
mach = "*-hp-hpux11.[0-3]*";
files = sys/pthread.h;
- select = "^#define[ \t]*__POINTER_SET[ \t]*\\(\\(void \\*\\) 1LL\\)";
+ select = "^(#define[ \t]+__POINTER_SET[ \t0,]*)(.*\\))";
c_fix = format;
- c_fix_arg = "#define __POINTER_SET\t\t((void *) 1L)";
+ c_fix_arg = "%11";
test_text = "#define __POINTER_SET\t\t((void *) 1LL)";
};