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]

PATCH: PR target/ia64-hp-hpux11.23: Header file fixup


Starting with GCC 4.0, GCC gives an error on arrays with an element type
of an unknown struct or union, even if it is not used.  The HP-UX
headers have such a declaration and this patch changes it from an extern
array to an extern pointer.

Tested on main line and on the 4.1 branch with no regressions.

Mark, is it OK to check this change in on the 4.1 branch as well as main
line?  It isn't a regression from 4.0 but it is a regression from 3.*.

Steve Ellcey
sje@cup.hp.com


2006-02-16  Steve Ellcey  <sje@cup.hp.com>

	PR target/26189
	* inclhack.def (hpux_spu_info): New.
	* fixincl.x: Regenerate

Index: inclhack.def
===================================================================
--- inclhack.def	(revision 110852)
+++ inclhack.def	(working copy)
@@ -1701,6 +1701,22 @@ fix = {
 
 
 /*
+ *  Fix HP-UX <ia64/sys/getppdp.h> to avoid array of undefined union type.
+ */
+fix = {
+    hackname = hpux_spu_info;
+    mach     = "*-hp-hpux*";
+    files    = ia64/sys/getppdp.h;
+    select   = 'extern union mpinfou spu_info\[\]';
+
+    c_fix     = format;
+    c_fix_arg = 'extern union mpinfou *spu_info';
+
+    test_text = 'extern union mpinfou spu_info[];';
+};
+
+
+/*
  *  Fix glibc definition of HUGE_VAL in terms of hex floating point constant
  */
 fix = {


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