[Top][All Lists]

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

Re: [Chicken-users] More on aliasing.

From: felix
Subject: Re: [Chicken-users] More on aliasing.
Date: Tue, 9 Jul 2002 09:19:38 +0200

Anthony Carrico wrote:
> Is there any reason to assume the C compiler is better off casting and
> masking instead of using unions + bitfields + structs? It seems to me (at
> least in theory) that the more accurate the information you share with the
> compiler the better. This is the kind of thing C is supposed to be good
> at. (Obviously it would be a lot of work to actually change the code
> though).

I agree. In an ideal world the C-compiler should be able to generate the
code, the more information it gets (and it gets definitely more with the
approach). What finally is generated is a different thing, though.
Unfortunately using unions instead of casts needs a major cleanup in
the Chicken-backend. I have to check this out.

For the time being I think it's best to use `-fno-strict-aliasing', except
platforms that are known not to give any trouble (x86 and PowerPC).


reply via email to

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