constant expressions change? CVS build failure on IA64
Gabriel Dos Reis
gdr@integrable-solutions.net
Mon Sep 13 22:54:00 GMT 2004
"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
More information about the Gcc
mailing list