From owner-freebsd-stable Sat Jul 13 0: 8:19 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 F290C37B400 for ; Sat, 13 Jul 2002 00:08:16 -0700 (PDT) Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CD0D43E58 for ; Sat, 13 Jul 2002 00:08:14 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g6D78DY97866; Sat, 13 Jul 2002 01:08:13 -0600 (MDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g6D78BG35594; Sat, 13 Jul 2002 01:08:11 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 13 Jul 2002 01:07:53 -0600 (MDT) Message-Id: <20020713.010753.51683482.imp@bsdimp.com> To: e0026813@stud3.tuwien.ac.at Cc: behanna@zbzoom.net, stable@FreeBSD.ORG Subject: Re: GCC/header-related regressions on -STABLE From: "M. Warner Losh" In-Reply-To: <20020713003456.GB238@frog.fafoe> References: <20020712201311.T39095-100000@topperwein.dyndns.org> <20020713003456.GB238@frog.fafoe> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 In message: <20020713003456.GB238@frog.fafoe> Stefan Farfeleder writes: : On Fri, Jul 12, 2002 at 08:13:50PM -0400, Chris BeHanna wrote: : > On Thu, 11 Jul 2002, Gerald Pfeifer wrote: : > : > > standards/40084 and standards/40402 constitute significant regressions : > > on -STABLE, which definitely should be fixed for 4.6.1-RELEASE. Chances are good that 4.6.1-RELEASE won't fix something so trivial. I have excellent patches to the PCCARD system that fix real problems for people that won't be included. Chances are good that 4.7-RELEASE will fix them, however, (both the pccard issue and the compiler issues). : > > Having three-line C++ programs like the following : > > #include : > > #include : > > int main() { } : > > issue three(!) warnings with g++ -pedantic is A Very Bad Thing[TM], : > > especially on -STABLE. : > : > Should it not at least gripe that there's no return statement in a : > non-void function? : : Both C++ and C99 treat main() specially: leaving the function's scope : without an explicit "return"-statement means that 0 is returned to the : implementation. True, but in C90 (and definitely in K&R) int main() { } was more or less the same as: int main() { return (rand()); } since whatever was in the magic register that returned the value for the function was what got returned :-). There's a lot of SYS V code that had return (0); added to the end of most of the main functions because of this. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message