Bug 39606 - expression statements lose excess precision
Summary: expression statements lose excess precision
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: stmt-expr, wrong-code
Depends on:
Blocks:
 
Reported: 2009-04-01 00:36 UTC by Joseph S. Myers
Modified: 2022-11-28 18:29 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-04-22 23:33:15


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph S. Myers 2009-04-01 00:36:08 UTC
As I noted in <http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00105.html>:
excess precision is removed as part of evaluating an expression statement.
There are two minor problems associated with this:

* If in future GCC preserves such conversions when needed for floating-point
exceptions, the conversions (that are not part of the C99 semantics for
excess precision) will cause spurious exceptions.

* Statement expressions have no excess precision; it would be more natural
for them to have whatever excess precision their last contained expressions
have.
Comment 1 Andrew Pinski 2009-04-22 23:33:15 UTC
Confirmed.