[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] More on aliasing.

From: Anthony Carrico
Subject: Re: [Chicken-users] More on aliasing.
Date: Mon, 8 Jul 2002 16:05:17 -0400 (EDT)

On Mon, 8 Jul 2002, Peter Keller wrote:

> > Given the readability advantages, the only reason I can think of to be
> > worried is if the compiler might stop using registers. Do you know if this
> > is a problem? Can gcc put a register sized union into a register (assuming
> > nothing needs the union's address)?
> Registers? Like this?
> register union foo;

No, I didn't mean the register declaration.

On Fri, 5 Jul 2002, Peter Keller wrote:
> pieces of memory if the memory is _defined_ as being contiguous in
> memory like a union or a struct.

I was just wondering if this definition you mentioned was strict enough to
prevent the compiler from putting (register sized) unions into machine
registers even when their address was never actually used. If so, then
obviously this restriction could really slow down union code vs. the
equivalent casting code. I hope this is the case, otherwise the strict
aliasing optimization switch wouldn't be very useful for this kind of

  -Tony Carrico

reply via email to

[Prev in Thread] Current Thread [Next in Thread]