From owner-freebsd-stable Wed Oct 9 10: 2:12 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8738437B401 for ; Wed, 9 Oct 2002 10:02:10 -0700 (PDT) Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id A129443E65 for ; Wed, 9 Oct 2002 10:02:09 -0700 (PDT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [IPv6:::1]) by lurza.secnetix.de (8.12.5/8.12.5) with ESMTP id g99H27mC000685 for ; Wed, 9 Oct 2002 19:02:07 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.12.5/8.12.5/Submit) id g99H27g3000684; Wed, 9 Oct 2002 19:02:07 +0200 (CEST) Date: Wed, 9 Oct 2002 19:02:07 +0200 (CEST) Message-Id: <200210091702.g99H27g3000684@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG Reply-To: freebsd-stable@FreeBSD.ORG Subject: Re: gcc2.95.4 pointer not defined In-Reply-To: <20021009154125.GB797@raggedclown.net> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.6-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Cliff Sarginson 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