gcc bug?
Randy Chapman (chapman@u.washington.edu)
Fri, 15 Dec 1995 23:15:36 -0800 (PST)
Hopefully someone here will know a way to work around this (preferably
a compile flag =) gcc seems to be doing sign extensions in places where
it ought not in some conditions (this verified against dec cc,
which compiles this code fine).
The code trinket:
unsigned char c = 0xca;
unsigned long l;
l = c<<24;
printf("%lX\n",l);
l will be 0xFFFFFFFFCA000000 with gcc. And 0xCA000000 with cc (what I
want). gcc for osf/1 does the same, btw.
Where's the right place to report this anyhow?
Thanks,
--randy