This is the mail archive of the gcc@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]

Re: gcc #pragma pack(push[,n]) target spesific ?


Matthew J Fletcher wrote:
Is this correct ?, comments in the appropreate config.h files indicate that HANDLE_PRAGMA_PACK_PUSH_POP, is mostly used for wine compatablity, but is there any reason why HANDLE_PRAGMA_PACK_PUSH_POP is not present on all targets ? also there is not a configure option.

The pragma documentation states that we discouraged use of pragmas in the past, because of language design problems fixed in the ISO C99 standard. Because of this, pragmas are only enabled for targets that require them, for compatibility with other compilers.


As you mentioned yourself, HANDLE_PRAGMA_PACK_PUSH_POP is for win32 compatibility, and the *-elf targets don't require win32 compatibility, generally. The only targets this is enabled for are ones that have required use of it.

It might be reasonable to change the policy, and enable it for more targets, or perhaps just for the embedded elf ones. It would also be reasonable to improve the docs. I'd suggest filing a bug report into bugzilla if you haven't already.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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