From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,d8fe0a66b911f78d X-Google-Attributes: gidfc89c,public X-Google-Thread: f678f,d8fe0a66b911f78d X-Google-Attributes: gidf678f,public X-Google-Thread: fee84,d8fe0a66b911f78d X-Google-Attributes: gidfee84,public From: Joe Mario Subject: Re: cc bugs? Date: 1996/07/22 Message-ID: <31F3C67A.237C@zk3.dec.com>#1/1 X-Deja-AN: 169525043 references: to: philips@jse.co.za cc: mario content-type: text/plain; charset=us-ascii organization: CTG mime-version: 1.0 newsgroups: comp.unix.programmer,comp.unix.osf.osf1,comp.unix.osf.misc x-mailer: Mozilla 3.0b5aGold (X11; I; OSF1 V4.0 alpha) philips@jse.co.za wrote: > > #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 > > The first one is that >> on a full unsigned long of > 1 bits fails to do anything. > The second is that the compiler does not recognise hex > chars. The default mode for C compilers on Digital UNIX is -std0, commonly referred to as common or K&R mode. K&R C did not support hex escape sequences. If you recompile in either of the ANSI modes, -std or -std1, you'll find escape sequences are supported and you get the results you expect. Concerning your first problem, I ran your program and the output did do the shift. Can you post the exact version of the OS and show the output you're getting? Thanks, Joe Mario