This is the mail archive of the
mailing list for the GCC project.
Re: C++ PATCH to cp/decl.c: Timing name lookup
- From: Zack Weinberg <zack at codesourcery dot com>
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Cc: Jason Merrill <jason at redhat dot com>, "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, <gdr at integrable-solutions dot net>, <gcc-patches at gcc dot gnu dot org>, <pinskia at physics dot uc dot edu>
- Date: Thu, 13 Feb 2003 16:47:51 -0800
- Subject: Re: C++ PATCH to cp/decl.c: Timing name lookup
- References: <Pine.LNX.firstname.lastname@example.org>
"Joseph S. Myers" <email@example.com> 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
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.