From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Ian Lance Taylor <iant@google.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [4.5 C] C99-conforming excess precision (fix PR 323 for C)
Date: Wed, 05 Nov 2008 17:24:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.0811051710450.13683@digraph.polyomino.org.uk> (raw)
In-Reply-To: <m3fxm62n7f.fsf@google.com>
On Wed, 5 Nov 2008, Ian Lance Taylor wrote:
> "Joseph S. Myers" <joseph@codesourcery.com> writes:
>
> > Bootstrapped with no regressions on i686-pc-linux-gnu. Are the
> > non-C-front-end parts OK for 4.5?
>
> This is OK for 4.5.
(Note that this is built on the infrastructure from my constant
expressions patch
<http://gcc.gnu.org/ml/gcc-patches/2008-10/msg01061.html>, which has
changes to builtins.c and cp/typeck.c pending review for 4.5.)
> What happens if -fexcess-precision=standard is used with C++? It
> seems that the option will be accepted without complaint but that
> there may be some cases where it will not work correctly. It might be
> better to reject the option until the C++ frontend can be corrected.
Yes, the option is quietly ignored for
* languages whose front ends do not implement it (i.e. implement some form
of predictable semantics for the option that mean GIMPLE arithmetic is not
generated for types the back end does not support arithmetic on);
* processors with no excess precision issues, and processor configurations
such as -mfpmath=sse without such issues (this should in theory work with
-mfpmath=sse changing on a per-function basis; at least, the relevant
variable setting is done as part of reinitialization);
* configurations with options that are expected to give unpredictable
excess precision (-mfpmath=sse+387) or to give larger errors than arise
with excess precision (-funsafe-math-optimizations).
The first could alternatively become an error as you suggest, or could
make the option an alias for -ffloat-store for such front ends as the
nearest equivalent available. (Such an error or -ffloat-store aliasing
would in the simplest implementation apply for all processors including
those with no excess precision issues, though the compiler could be made
to track whether there is a non-default TARGET_FLT_EVAL_METHOD definition
or whether it's known that there will be no excess precision issues in any
function.)
I do hope people will eventually implement suitable predictable semantics
for other front ends so -ffloat-store can end up as an alias for the new
option, flag_float_store checks in optimizers can go away and the PR can
be closed.
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2008-11-05 17:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-04 2:08 Joseph S. Myers
2008-11-05 15:44 ` Ian Lance Taylor
2008-11-05 17:24 ` Joseph S. Myers [this message]
2008-11-05 18:37 ` Ian Lance Taylor
2008-11-09 21:11 ` Joseph S. Myers
2008-11-10 19:14 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0811051710450.13683@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=iant@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).