From owner-freebsd-current@FreeBSD.ORG Mon Jun 16 14:37:19 2008 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4644B106566B for ; Mon, 16 Jun 2008 14:37:19 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [212.17.241.230]) by mx1.freebsd.org (Postfix) with ESMTP id B75868FC13 for ; Mon, 16 Jun 2008 14:37:18 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id m5GE8BWN096949; Mon, 16 Jun 2008 16:08:14 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id m5GE89RR096948; Mon, 16 Jun 2008 16:08:09 +0200 (CEST) (envelope-from olli) Date: Mon, 16 Jun 2008 16:08:09 +0200 (CEST) Message-Id: <200806161408.m5GE89RR096948@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG, julian@elischer.org In-Reply-To: <48537B5F.30207@elischer.org> X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 16 Jun 2008 16:08:14 +0200 (CEST) Cc: Subject: Re: mprof and new systems.. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@FreeBSD.ORG, julian@elischer.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, 16 Jun 2008 14:37:19 -0000 Julian Elischer wrote: > in addition, with -O2 it seems that the address of the variable > may actually be wring if the optimiser never bothers to > have the variable actually saved. Maybe I'm missing the obvious here, but you can prevent the compiler from optimizing the variable by declaring it as "volatile". Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "C++ is to C as Lung Cancer is to Lung." -- Thomas Funke