From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,d8fe0a66b911f78d,start X-Google-Attributes: gidfc89c,public X-Google-Thread: f678f,d8fe0a66b911f78d,start X-Google-Attributes: gidf678f,public X-Google-Thread: fee84,d8fe0a66b911f78d,start X-Google-Attributes: gidfee84,public From: philips@jse.co.za Subject: cc bugs? Date: 1996/07/20 Message-ID: #1/1 X-Deja-AN: 168987929 content-type: TEXT/PLAIN; charset=US-ASCII organization: No organisation supplied mime-version: 1.0 newsgroups: comp.unix.programmer,comp.unix.osf.osf1,comp.unix.osf.misc #include main() { unsigned long E1 = ~0 ; printf("%lu %lu %d %d\n",E1 >> 1, E1/2,0x20,'\x20'); return 0; } Found what I think are 2 bugs in the standard Digital UNIX cc compiler this week. Not sure of the OS version, but I think it is 3.2 patch level 148. The first one is that >> on a full unsigned long of 1 bits fails to do anything. This is a standard trick I use to to find the largest +ve 2 complement number. The second is that the compiler does not recognise hex chars. It was leathfull because I had it in a test for characters below space which cause a lookup on a table to core dump. if ( khar < 'x20) tbl[khar].xxxx I'll be interested to hear if anyone agrees with my findings. I am posting this from an Internet Cafe so please email any responses to: philips@jse.co.za Regards Philip Shearer