From owner-freebsd-bugs Sun Aug 25 13:30: 6 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 330C637B400 for ; Sun, 25 Aug 2002 13:30:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E85C143E77 for ; Sun, 25 Aug 2002 13:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7PKU3JU071006 for ; Sun, 25 Aug 2002 13:30:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7PKU33t071005; Sun, 25 Aug 2002 13:30:03 -0700 (PDT) Date: Sun, 25 Aug 2002 13:30:03 -0700 (PDT) Message-Id: <200208252030.g7PKU33t071005@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Matt Watson Subject: Re: bin/40209: __dtoa broken with -O2 or -O3 optimisation Reply-To: Matt Watson 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 The following reply was made to PR bin/40209; it has been noted by GNATS. From: Matt Watson To: freebsd-gnats-submit@FreeBSD.org, dan@obluda.cz Cc: Subject: Re: bin/40209: __dtoa broken with -O2 or -O3 optimisation Date: Sun, 25 Aug 2002 13:28:43 -0700 226: #define word0(x) ((ULong *)&x)[1] 227: #define word1(x) ((ULong *)&x)[0] This has always been non-conforming C, and is now causing problems due to the default behavior of -fstrict-aliasing in recent GCC distributions. C99 section 6.5 says: [#7] An object shall have its stored value accessed only by an lvalue expression that has one of the following types: You can use type-punning with a union to fix this, or use -fno-strict-aliasing. matt. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message