This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix PR target/33700


The enclosed change fixes a small issue with the hpux11 sys/pthread.h
header.  The use of a long long constant causes a warning with -pedantic
and the failure of 17_intro/headers/all_pedantic_errors.cc.

Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.  Committed
to trunk.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2007-10-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR target/33700
	* inclhack.def (hpux11_pthread_const): New.
	* fixincl.x: Regenerate.
	* tests/base/sys/pthread.h: Update.

Index: tests/base/sys/pthread.h
===================================================================
--- tests/base/sys/pthread.h	(revision 129301)
+++ tests/base/sys/pthread.h	(working copy)
@@ -9,6 +9,11 @@
 
 
 
+#if defined( HPUX11_PTHREAD_CONST_CHECK )
+#define __POINTER_SET		((void *) 1L)
+#endif  /* HPUX11_PTHREAD_CONST_CHECK */
+
+
 #if defined( HPUX_PTHREAD_INITIALIZERS_CHECK )
 #define PTHREAD_MUTEX_INITIALIZER  {					\
 	{ __PTHREAD_MUTEX_VALID, 0 },					\
Index: inclhack.def
===================================================================
--- inclhack.def	(revision 129301)
+++ inclhack.def	(working copy)
@@ -1952,6 +1952,20 @@
 };
 
 /*
+ *  Fix C99 constant in __POINTER_SET define.
+ */
+fix = {
+    hackname  = hpux11_pthread_const;
+    mach      = "*-hp-hpux11.[0-3]*";
+    files     = sys/pthread.h;
+    select    = "^#define[ \t]*__POINTER_SET[ \t]*\\(\\(void \\*\\) 1LL\\)";
+
+    c_fix     = format;
+    c_fix_arg = "#define __POINTER_SET\t\t((void *) 1L)";
+    test_text = "#define __POINTER_SET\t\t((void *) 1LL)";
+};
+
+/*
  *  Add missing braces to pthread initializer defines.
  */
 fix = {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]