This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: #pragma push breaks bootstrap?
- To: robertl at dgii dot com
- Subject: Re: #pragma push breaks bootstrap?
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Fri, 2 Oct 1998 15:53:04 -0700
- CC: egcs at cygnus dot com
Hi Robert,
: So this certainly seems to explain things. Note that this target is one
: of the relatively few that defines 'HANDLE_SYSV_PRAGMA' so this means that
: HANDLE_PRAGMA_PACK will be turned on by c-pragma.h.
Ohh, I was assuming that the target did not define HANDLE_SYSV_PRAGMA.
: Should the two forms of PRAGMA_PACK play nicely with each other?
Yes they should. (That was certainly my intention).
In your example:
: In this example, "stage1/" holds a "bad" compiler and "stage2/" holds
: one that works. As a sanity check, I show the results from the system
: compiler, too.
:
:
: (robertl) rjlhome:/play/negcs/gcc
: $ stage1/xgcc -Bstage1/ /tmp/p.c && ./a.out
: 10 18
: 18
: (robertl) rjlhome:/play/negcs/gcc
: $ stage2/xgcc -Bstage2/ /tmp/p.c && ./a.out
: 10 10
: 10
: (robertl) rjlhome:/play/negcs/gcc
: $ /bin/cc /tmp/p.c && ./a.out
: 10 10
: 10
Is stage1/xgcc the one built when HANDLE_PRAGMA_PACK_PUSH_POP is
enabled or disabled ?
You see with the new code defining either (or both of)
HANDLE_SYSV_PRAGMA or HANDLE_PRAGMA_PACK_PUSH_POP in a target header
file will cause HANDLE_PRAGMA_PACK to be defined in c-pragma.h, which
will enable the parsing of #pragma pack(<n>) in c-pragma.c. So even
if HANDLE_PRAGMA_PACK_PUSH_POP is *not* defined but HANDLE_SYSV_PRAGMA
*is* defined then the (rearranged) code for handling #pragma pack(<n>)
should be used. And since gcc appears to work when H_P_P_P_P is not
defined, it would appear that the code is working.... [All of this
assumes that HANDLE_SYSV_PRAGMA is defined in your toiolchain. Could
you just check this to make sure].
Cheers
Nick