From: philips@jse.co.za
Subject: cc bugs?
Date: 1996/07/20 [thread overview]
Message-ID: <NEWTNews.837886978.30140.anonymous@cafe4.softconn.co.za> (raw)
#include <stdio.h>
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
next reply other threads:[~1996-07-20 4:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-20 4:00 philips [this message]
1996-07-22 4:00 ` cc bugs? Stephen Baynes
1996-07-22 4:00 ` Joe Mario
[not found] ` <31F4A4BE.6201@iisc.com>
1996-07-23 4:00 ` Stephen Baynes
1996-07-23 4:00 ` Charles M Richmond
1996-07-25 4:00 ` Dan Pop
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox