Date: Sun, 25 Aug 2002 13:30:03 -0700 (PDT) From: Matt Watson <mwatson@apple.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/40209: __dtoa broken with -O2 or -O3 optimisation Message-ID: <200208252030.g7PKU33t071005@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/40209; it has been noted by GNATS.
From: Matt Watson <mwatson@apple.com>
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:
<list not including the above cast>
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208252030.g7PKU33t071005>
