strict-aliasing and typedefs

Gabriel Dos Reis gdr@integrable-solutions.net
Wed May 14 21:32:00 GMT 2003


Andreas Schwab <schwab@suse.de> writes:

[...]

| int *sp;
| int *hp;
| 
| |> I'm wondering if a Scheme->C compiler
| |> can use typedefs and ISO C's aliasing rules to tell gcc that certain
| |> memory locations cannot alias each other.
| 
| One way to do this is to define differently named structures with a single
| member, but they may pessimize the generated code due to ABI
| peculiarities.

As I understand it, he would like an object-based non-alias
optimization, I believe restrict is a good candidate.

-- Gaby



More information about the Gcc mailing list