Date: Thu, 14 Jan 2021 20:09:27 +0100 From: David Marec <david@lapinbilly.eu> To: freebsd-hackers@freebsd.org Subject: Re: Some fun with -O2 Message-ID: <129286cb-dce3-283d-48d4-d6a9623e7d20@lapinbilly.eu> In-Reply-To: <CAPyFy2CY_tMo=%2BeX5E0_Yp=c=1Ei0v6e5p1uvVaLH7%2BXTisoBw@mail.gmail.com> References: <YAAqI08bgBtfpssP@graf.pompo.net> <YAAuouAngRyT7Dw0@kib.kiev.ua> <YAA2a4hBEc4xWJ3Z@graf.pompo.net> <CAPyFy2CY_tMo=%2BeX5E0_Yp=c=1Ei0v6e5p1uvVaLH7%2BXTisoBw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 14/01/2021 15:22, Ed Maste wrote: > On Thu, 14 Jan 2021 at 07:17, Thierry Thomas <thierry@freebsd.org> wrote: >>> Workaround is to add -fwrapv compiler switch. >> Indeed, but the fun part is the different behaviour with / without -O2. > Perhaps fun, but not surprising; this is a consequence of some optimization. Actually, this is documented in the /autoconf/ manual: https://www.gnu.org/software/autoconf/manual/autoconf-2.70/autoconf.html#Integer-Overflow-Basics -- It's a trap! David Marec http://wiki.fug-fr.org/doku.php?id=start
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?129286cb-dce3-283d-48d4-d6a9623e7d20>