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: constant expressions change? CVS build failure on IA64


"Boehm, Hans" <hans.boehm@hp.com> writes:

Hi Hans,

| CVS gcc4.0 no longer seems to accept the expression in
| 
| # define _SC_GR0_OFFSET	\
| 	(((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)
| 
| in Linux/IA64 sys/ucontext.h as a constant.  This eventually results
| in a gcc build failure.  (A workaround is to change the header file to use
| the non-gcc definition.)
| 
| Was this change intentional?

Yes, the idea is that those are not constant expressions in standard C
and one should be using offsetof in the first place.

It however will be tolerated again in 3.4.3 for a short period, if I
understand correctly.

-- Gaby


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