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: [tree-ssa] more aggressive address folding


On Wed, 19 Nov 2003, Richard Henderson wrote:

> I don't buy it, myself.  If offsetof is the only reason, then we
> should add code to fold() to handle ADDR_EXPR of COMPONENT_REF and
> ARRAY_REF with an INTEGER_CST base pointer.

We should add __builtin_offsetof to the grammar (for both C and C++) to do
this properly.  offsetof must return an integer constant expression, but
the traditional offsetof expansion mustn't.

-- 
Joseph S. Myers
jsm@polyomino.org.uk


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