Anders Torger <[EMAIL PROTECTED]> wrote:
> I found a case where GCC does not warn even with
> -Wstrict-aliasing, but makes incorrect asm code anyway.
> unsigned long
> hash(void *key)
> {
> unsigned long long u[1];
> u[0] = *(unsigned long long *)key;
> return ((unsigned long *)u)
On Nov 9, 2004, at 2:23 PM, Anders Torger wrote:
gcc 2.95 generates correct code.
It just generates code which you expected not the code which
the C standard says it is undefined (oh by the way we could wipe
your HD if you invoke undefined behavior).
Also a DR report says we cannot error out on u