From owner-cvs-all Tue Sep 11 12:54:22 2001 Delivered-To: cvs-all@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id E920D37B40B; Tue, 11 Sep 2001 12:54:14 -0700 (PDT) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f8BJsEM68787; Tue, 11 Sep 2001 12:54:14 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 7D4D5380A; Tue, 11 Sep 2001 12:54:14 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Bruce Evans Cc: "Brian F. Feldman" , Mark Murray , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern subr_prf.c src/sys/sys systm.h In-Reply-To: <20010912002041.J5036-100000@delplex.bde.org> Date: Tue, 11 Sep 2001 12:54:13 -0700 From: Peter Wemm Message-Id: <20010911195414.7D4D5380A@overcee.netplex.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bruce Evans wrote: > On Mon, 10 Sep 2001, Brian F. Feldman wrote: > > > Mark Murray wrote: > > > > This hack brought to you by some questionable ``optimizations'' in gc c-3. > > > > gcc-3 takes it apon itself to convert: > > > > printf("string\n") -> puts("string"); > > > > and: > > > > printf("a"); -> putchar('a') > > > > etc. I dont know what they've been smoking over there in gcc-land, b ut > > > > it must be pretty good stuff. > > > > > > This "optimzation" on the part of GCC is extremely rude, IMVHO. Is there > > > a way (#define ?) of permanently disabling it? > > > > > > C is not FORTRAN - there are no intrinsic functions in C. Grrrrr..... > > > > Agreed. Peter's original comment was absolutely justified. The _ONLY_ cas e > > I can see this possibly being even moderately alright is if it is somehow > > done in a way that makes it act like a macro definition and can be > > #undefined or (called)() in one of the standard ways. > > Disagreed. This seems like a normal optimization to me. It's like > replacing strlen("foo") by 3. This is bogus too. Who says that strlen("foo") returns three in the library I am linking with? These optimizations should only be activated if #include or #include and there is some sort of attribute marker on the functions being optimized. Unless I #include , then strlen() is not any of the compiler's business. Unless I #include , then printf() is not any of the compiler's business. Otherwise any under-the-table substitutions are bogus. These functions are not part of the core language spec, they are something that is introduced as part of the optional includes and standard c library. > Bruce > > > Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message