From owner-freebsd-arch@FreeBSD.ORG Mon Jan 31 16:41:44 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2689B16A4CE for ; Mon, 31 Jan 2005 16:41:44 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCA1743D39 for ; Mon, 31 Jan 2005 16:41:43 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.1/8.13.1) with ESMTP id j0VGfxTC011641; Mon, 31 Jan 2005 11:41:59 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.1/8.13.1/Submit) id j0VGfvO5011640; Mon, 31 Jan 2005 11:41:57 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Mon, 31 Jan 2005 11:41:57 -0500 From: David Schultz To: Paul Richards Message-ID: <20050131164157.GA11469@VARK.MIT.EDU> Mail-Followup-To: Paul Richards , arch@FreeBSD.ORG References: <20050128173327.GI61409@myrddin.originative.co.uk> <20050131102630.GJ61409@myrddin.originative.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050131102630.GJ61409@myrddin.originative.co.uk> cc: arch@FreeBSD.ORG Subject: Re: c99/c++ localised variable definition X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2005 16:41:44 -0000 On Mon, Jan 31, 2005, Paul Richards wrote: > Ok, to sum up the discussion then: > > 1) In the kernel the issue of stack usage is a relevant consideration > against adopting the new style. Is it? In my experience, gcc 3.X does a proper liveness analysis at -O1 and higher, and reuses stack space pretty well. This is an elementary optimization. (Some people don't seem to trust the compiler to do this, so they do evil things such as reuse an identifier to mean two different things in the same function.)