This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/43128] [4.5 Regression] c-c++-common/pr41779.c doesn't work
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2010 10:23:26 -0000
- Subject: [Bug c/43128] [4.5 Regression] c-c++-common/pr41779.c doesn't work
- References: <bug-43128-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #21 from manu at gcc dot gnu dot org 2010-02-23 10:23 -------
(In reply to comment #19)
>
> The present logic is: convert (with convert_and_check) both operands to a
> common type, which may have excess precision; then, later, after producing
> the tree for the result of the operation, wrap that in an
> EXCESS_PRECISION_EXPR, using the semantic type, if there is a semantic
> type different from the type with excess precision.
This is only true for build_binary_op. In build_conditional_expr both operands
are converted to the semantic type first, if I am reading the code correctly,
so there is nothing to fix (in fact, I cannot build a testcase that misses the
warning when using conditional expression).
The code of build_binary_op is a bit complex, specially the interaction between
result_type, final_type, buid_type, converted and real_result_type.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43128