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


"Joseph S. Myers" <jsm28@cam.ac.uk> writes:

> 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.

I wouldn't mind seeing __builtin_offsetof().

I am a little leery of this __constant_expression__ notion; I would
prefer to see an explicit list maintained, in the documentation, of
acceptable integer constant expressions over and above those in the
standard(s).  The existing __extension__ should then suffice to avoid
an error.

One special case I care personally about: 
(__builtin_constant_p (EXPR) ? (EXPR) : INTEGER_LITERAL) should be an
acceptable integer constant expression no matter what EXPR is (as long
as it is indeed an expression).  This is currently true, and 
insn-conditions.c relies on it.

zw


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