From owner-freebsd-bugs Sun Aug 11 14:27:15 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEFA637B405; Sun, 11 Aug 2002 14:27:04 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 4270043E75; Sun, 11 Aug 2002 14:27:03 -0700 (PDT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 11 Aug 2002 22:27:02 +0100 (BST) Date: Sun, 11 Aug 2002 22:27:01 +0100 From: David Malone To: Dan Lukes Cc: freebsd-bugs@FreeBSD.org, bde@FreeBSD.org Subject: Re: bin/40209: __dtoa broken with -O2 or -O3 optimisation Message-ID: <20020811212701.GA95745@walton.maths.tcd.ie> References: <200207150140.g6F1e4SI056496@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200207150140.g6F1e4SI056496@freefall.freebsd.org> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, Jul 14, 2002 at 06:40:04PM -0700, Dan Lukes wrote: > 226: #define word0(x) ((ULong *)&x)[1] > 227: #define word1(x) ((ULong *)&x)[0] I guess that changing x by accessing word0 or word1 is a violation of the aliasing rules. The deinitions might work: union doubleasulongs { double x; ULong w[2]; }; #define word0(x) (((union doubleasulongs *)&x)->w)[1] #define word1(x) (((union doubleasulongs *)&x)->w)[0] Could you test them and see? David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message