--- Comment #8 from mmitchel at gcc dot gnu dot org 2008-12-09 19:20
---
With respect to Comment #4: I see no reason for C++ to be different than C in
this respect, and thus I see no reason not to perform the computation at
compile-time.
In general, although some in the committees do
--- Comment #9 from sylvain dot pion at sophia dot inria dot fr 2008-12-09
20:03 ---
Incidentally, I submitted to WG21 a few days ago a proposal which will appear
in the coming mid-term mailing as N2811, named Directed Rounding Arithmetic
Operations. In the meantime, you can find it
--- Comment #7 from rguenth at gcc dot gnu dot org 2008-08-22 14:59 ---
Interestingly enough this is only broken on the trunk for me, where we reject
the code.
/abuild/rguenther/trunk-g/gcc/t.ii:1: error: initializer for floating value is
not a floating constant
--- Comment #6 from sylvain dot pion at sophia dot inria dot fr 2008-08-18
16:12 ---
Maybe my comment is going to be out of scope, but the question is also
to know what the primary question is here, that is, what usage is supposed
to be supported by -frounding-math.
g++ currently
--- Comment #3 from jakub at gcc dot gnu dot org 2008-08-14 08:03 ---
I think the primary question is, do we expect -frounding-math to force this to
be evaluated at runtime or not?
If it should be evaluated at runtime, then I'd say initializer_constant_valid_p
should reject PLUS_EXPR
--- Comment #4 from joseph at codesourcery dot com 2008-08-14 12:18 ---
Subject: Re: [4.2/4.3/4.4 regression] ICE with -frounding-math
-g
On Thu, 14 Aug 2008, jakub at gcc dot gnu dot org wrote:
I think the primary question is, do we expect -frounding-math to force this to
be
--- Comment #5 from jakub at gcc dot gnu dot org 2008-08-14 18:11 ---
Yeah. In C we won't see addition or subtraction of 2 FLOAT_TYPE_P constants in
initializer_constant_valid_p, as it has been folded.
--
jakub at gcc dot gnu dot org changed:
What|Removed
--- Comment #2 from reichelt at gcc dot gnu dot org 2008-08-13 20:48
---
The following line triggers the ICE since GCC 4.1.0:
const double c = .1, d = c+1;
--
reichelt at gcc dot gnu dot org changed: