From owner-freebsd-current@FreeBSD.ORG Mon Jan 30 12:12:59 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A287116A420 for ; Mon, 30 Jan 2006 12:12:59 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id D939A43D46 for ; Mon, 30 Jan 2006 12:12:56 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (fwnetw@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k0UCCnlq054150 for ; Mon, 30 Jan 2006 13:12:55 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k0UCCnu6054149; Mon, 30 Jan 2006 13:12:49 +0100 (CET) (envelope-from olli) Date: Mon, 30 Jan 2006 13:12:49 +0100 (CET) Message-Id: <200601301212.k0UCCnu6054149@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG In-Reply-To: <20060129050435.A5945@xorpc.icir.org> X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 30 Jan 2006 13:12:55 +0100 (CET) X-Mailman-Approved-At: Mon, 30 Jan 2006 12:23:45 +0000 Cc: Subject: Re: for review: sys/dev/md/md.c patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@FreeBSD.ORG List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2006 12:12:59 -0000 Luigi Rizzo wrote: > just discovered, trying to resurrect picobsd on -current, > that the compiler in 6.x/7.x has become smart and, at least > with the default compilation flags, will optimize out > the "end_mfs_root" string from the object. Shouldn't it be sufficient to declare the string as volatile? That should prevent it from being optimized by the compiler. (I'm not questioning your solution, mind you. I just wonder if "volatile" would do the job. So far I've used volatile for things like sig_atomic_t only.) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "When your hammer is C++, everything begins to look like a thumb." -- Steve Haflich, in comp.lang.c++