This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/43128] [4.5 Regression] c-c++-common/pr41779.c doesn't work



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]