From owner-cvs-src@FreeBSD.ORG Thu Jul 10 15:51:57 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86E6B1065670; Thu, 10 Jul 2008 15:51:57 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4CE658FC15; Thu, 10 Jul 2008 15:51:57 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m6AFlbUn099131; Thu, 10 Jul 2008 09:47:37 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 10 Jul 2008 09:47:40 -0600 (MDT) Message-Id: <20080710.094740.1673060291.imp@bsdimp.com> To: danger@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <753889164.20080710011045@rulez.sk> References: <20080709154945.GA47824@zim.MIT.EDU> <4874FE82.5090809@localhost.inse.ru> <753889164.20080710011045@rulez.sk> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: dwmalone@maths.tcd.ie, cvs-src@FreeBSD.org, rik@inse.ru, cvs-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 style.9 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2008 15:51:57 -0000 In message: <753889164.20080710011045@rulez.sk> Daniel Gerzo writes: : Hello guys, : : Wednesday, July 9, 2008, 8:08:02 PM, has been written: : : >>> -Do not declare functions inside other functions; ANSI C says that : >>> -such declarations have file scope regardless of the nesting of the : >>> -declaration. : >>> -Hiding file declarations in what appears to be a local : >>> -scope is undesirable and will elicit complaints from a good compiler. : >>> +Do not declare functions inside other functions; nested functions are : >>> +a GCC extension and are not permitted by ANSI C. : >>> : >> : >> We use lots of extensions that aren't strict ANSI C. I think the : >> real reason not to use them is that gcc's nested functions are : >> particularly unwieldily. First, they're not true lexical closures : >> (and can't be), which makes them much less useful. Second, they : >> are unsupported unless a number of assumptions are met, e.g., must : >> have an executable stack, must be able to invalidate the I cache : >> from userland, and must not have separate I and D address spaces. : >> Nested functions abominable enough that Apple disabled the feature : >> in OS X's build of gcc --- and the Sun and Intel compilers don't : >> support them, even though Intel claims nearly complete gcc : >> compatibility. : >> : > I think from non-technical side, nested functions are not expected by : > most programmers. : > From my point of view there are many new extensions that a good for : > quick hacking, but : > not for the production code. : : So may I leave my change in the current state, or do you guys want me : to do some additional changes? Back out the '-' changes. Leave your change. Warner