Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Oct 2002 19:02:07 +0200 (CEST)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: gcc2.95.4 pointer not defined
Message-ID:  <200210091702.g99H27g3000684@lurza.secnetix.de>
In-Reply-To: <20021009154125.GB797@raggedclown.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Cliff Sarginson <cls@raggedclown.net> wrote:
 > On Wed, Oct 09, 2002 at 11:18:03AM -0400, Joe Talbott wrote:
 > > [...]
 > >   int *ip;
 > > 
 > >   *ip = 50;
 > > [...]
 > > I've tried this on a RedHat box and a SunOS box both worked as expected.

The behaviour that a C programmer should expect from that
piece of code is undefined behaviour.  The code is broken,
and it depends on the operating system what exactly happens.

 > And the Sunos C compiler is not a good reference point for acceptable
 > "C" !

It is the best C compiler I know, together with DEC's.
The TenDRA compiler is also very good ...  it's a shame
that it is not maintained anymore.

From a standard C language point of view, gcc sucks pretty
much.  I think gcc is not even a C compiler, if you take
the C standard strictly.

 > You would be amazed at the things it lets by that are wrong.

The above code is not wrong.  It's perfectly legal C.

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210091702.g99H27g3000684>