This is the mail archive of the gcc-patches@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: C++ PATCH to cp/decl.c: Timing name lookup


On Thu, 13 Feb 2003, Zack Weinberg wrote:

> People definitely use offsetof() in initializers, and glibc

offsetof() needs to be a full integer constant expression (using
__constant_expression__) as the standard requires this.

> stdio-common/vfprintf.c has a huge static table of initializers of the
> form &&label2 - &&label1.

I'd hope such tables can change to using __constant_expression__ (with an
appropriate macro definition for older GCC) rather than requiring GCC to
keep additional types of constant expressions beyond the single extension
(__constant_expression__(EXPR), "treat this expression as a constant
expression if it can be folded") needed to make offsetof constant.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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