From: Joe Mario <mario@zk3.dec.com>
To: philips@jse.co.za
Cc: mario
Subject: Re: cc bugs?
Date: 1996/07/22 [thread overview]
Message-ID: <31F3C67A.237C@zk3.dec.com> (raw)
In-Reply-To: NEWTNews.837886978.30140.anonymous@cafe4.softconn.co.za
philips@jse.co.za wrote:
>
> #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
>
> 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
next prev parent reply other threads:[~1996-07-22 4:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-20 4:00 cc bugs? philips
1996-07-22 4:00 ` Joe Mario [this message]
[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
1996-07-22 4:00 ` Stephen Baynes
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