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]

Re: MS Style #pragma pack(push,...)


[snip]
> > gcc now handles this almost perfectly (see question #2, below),
> > but you have to #define HANDLE_PRAGMA_PACK_PUSH_POP in
> > order to enable this code.
> 
> This will be enabled by default for all Linux configurations in gcc
> 2.96, and may have been there in 2.95 as well.
> 

This is not in 2.95.2.  Is 2.96 going to be released soon enough
that I shouldn't agitate for this in 2.95.3?


> > Second, the pattern of #pragmas that MS uses is similar
> > to the following:
> >
> >     #define _PACKNUM 4
> >     #pragma pack(push, _PACKNUM)
> >
> > Currently, gcc treats that as a compiler error, because it doesn't
> > expand the macro in cccp.c.  I have revised cccp.c to solve
> > this error, as is attached.
> 
> The new (1999) C standard requires some pragmas _not_ to be macro
> expanded.  For consistency we'd like all pragmas not to be expanded,
> unless some overriding concern exists.  This is a valid overriding
> concern - but what that means is you need to make your patch specific
> to #pragma pack.
> 

If I want to get this change into 2.96, should I develop a patch
against the CVS tip, or is there a branch label I should work from?

Thanks for help,

Jeremy

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