pragma pack on hp-ux

Eric Frias efrias@syncad.com
Sat Jan 22 00:03:00 GMT 2005


I posted on this list about three weeks ago asking about the possibility 
of enabling HANDLE_PRAGMA_PACK on HP-UX.  I didn't get any replies 
either for or against enabling it, so I thought I'd try again.

http://gcc.gnu.org/ml/gcc/2004-12/msg00683.html and
http://gcc.gnu.org/ml/gcc/2004-12/msg00845.html

A quick summary:
No form of #pragma pack is enabled on HP-UX.  I haven't been able to 
find any mention of why this is the case.  The lack of #pragma pack 
makes it much harder to port software.  I've enabled #pragma pack on my 
copy of gcc-4.0.0, and it doesn't appear to cause any harm -- the gcc 
test suite reports the same results with or without HANDLE_PRAGMA_PACK 
defined.

If there's no reason not to enable pragma pack, it would be nice to have 
it enabled in the standard gcc distribution.  If it helps to have a 
patch, there's one at the end of this message.  If there's some other 
procedure to submit patches for comment or review, please point me in 
the right direction.  Thanks,

Eric


*** gcc/gcc-3.4.2/gcc/config/pa/pa-hpux.h       Wed Oct  1 20:44:24 2003
--- gcc-3.4.2/gcc/config/pa/pa-hpux.h   Mon Dec 20 10:18:38 2004
***************
*** 21,26 ****
--- 21,28 ----
   #undef TARGET_DEFAULT
   #define TARGET_DEFAULT 0

+ #define HANDLE_PRAGMA_PACK
+
   /* Make GCC agree with types.h.  */
   #undef SIZE_TYPE
   #undef PTRDIFF_TYPE



More information about the Gcc mailing list