From owner-freebsd-chat Sun Sep 6 18:28:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA22242 for freebsd-chat-outgoing; Sun, 6 Sep 1998 18:28:57 -0700 (PDT) (envelope-from owner-freebsd-chat@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA22229 for ; Sun, 6 Sep 1998 18:28:52 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id KAA19048; Mon, 7 Sep 1998 10:58:48 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id KAA00653; Mon, 7 Sep 1998 10:58:48 +0930 (CST) Message-ID: <19980907105847.D583@freebie.lemis.com> Date: Mon, 7 Sep 1998 10:58:47 +0930 From: Greg Lehey To: Marc Slemko , jack Cc: freebsd-chat@FreeBSD.ORG Subject: Re: Where can I find C References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: ; from Marc Slemko on Sun, Sep 06, 1998 at 06:04:03PM -0700 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sunday, 6 September 1998 at 18:04:03 -0700, Marc Slemko wrote: > On Sun, 6 Sep 1998, jack wrote: > >> In the second edition (1988) `#include ' is part of that >> listing, and it is in that brace style. However, the include >> file is not required. >> >> germanium:jack {116} echo 'main(){printf("Hello World!\n");}' > >> hello.c >> germanium:jack {117} cc -o hello hello.c >> germanium:jack {118} ./hello >> Hello World! >> germanium:jack {119} cc -v >> gcc version 2.7.2.1 >> >> No warning, no errors, no core dumps. > > Just because it works on an implementation without problems or just > because it was "standard" at one point does not mean that current > standards allow it or that an implementation must work in that manner. True. But that has nothing to do with the original question. > So the issue is if the most relevant C standard says you need the > include, then it isn't C if you don't do it even if it compiles. That's your interpretation. If you read the compiler documentation, you'll see that it supports multiple standards. By default, this program works fine, and I claim that it's still C: === grog@freebie (/dev/ttyp0) ~ 2 -> cat >hello.c main() { printf("hello, world\n"); } You have mail in /var/mail/grog === grog@freebie (/dev/ttyp0) ~ 3 -> cc hello.c -o hello === grog@freebie (/dev/ttyp0) ~ 4 -> ./hello hello, world === grog@freebie (/dev/ttyp0) ~ 5 -> Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message