This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc floating-point optimizer weird behaviour
- From: Ian Lance Taylor <iant at google dot com>
- To: "Vladimir A. Pavlov" <pv4 at bk dot ru>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Sun, 25 Jan 2015 13:30:45 -0800
- Subject: Re: Gcc floating-point optimizer weird behaviour
- Authentication-results: sourceware.org; auth=none
- References: <1422208292 dot 773977820 at f135 dot i dot mail dot ru>
On Sun, Jan 25, 2015 at 9:51 AM, Vladimir A. Pavlov <pv4@bk.ru> wrote:
>
> Is it gcc bug or do I misunderstand how floating-point arithmetics
> works in C and what is allowed for optimizer?
>
> If it's my fault can anyone explain (e.g. provide links) please why
> it's an allowed behaviour of optimizer?
See the description of -fexcess-precision in the manual. You probably
want -fexcess-precision=standard or -std=c99.
Ian