Date: Sat, 13 Jul 2002 01:07:53 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: e0026813@stud3.tuwien.ac.at Cc: behanna@zbzoom.net, stable@FreeBSD.ORG Subject: Re: GCC/header-related regressions on -STABLE Message-ID: <20020713.010753.51683482.imp@bsdimp.com> In-Reply-To: <20020713003456.GB238@frog.fafoe> References: <Pine.BSF.4.44.0207111354090.22305-100000@pulcherrima.dbai.tuwien.ac.at> <20020712201311.T39095-100000@topperwein.dyndns.org> <20020713003456.GB238@frog.fafoe>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20020713003456.GB238@frog.fafoe> Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> 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 <iostream> : > > #include <string> : > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020713.010753.51683482.imp>