https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390

--- Comment #19 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
On Wed, 26 Sep 2018, vincent-gcc at vinc17 dot net wrote:

> 6.3.1.5p2 is only about explicit conversions and function calls (otherwise,
> types are not demoted magically). But in my example, d == i + 1, no demotion 
> is
> involved.

Assignments and function return can also demote types.  As explained in my 
message adding the feature in the first place, I chose to treat all of 
(assignment, initialization, cast, function call, function return, 
increment and decrement as variants of assignment) the same (removing 
excess precision in all cases), as a practical ABI matter when function 
calls and return are involved (and including when the calls is to an 
unprototyped or variadic function).

> I think that C11 just clarified. There hasn't been a defect report against 
> C99,

Whereas I consider this an actual semantic change in C11, with no 
allowance in C99 for any kind of conversion from integer to floating-point 
to have a result with excess precision and such an allowance explicitly 
added in C11.

Reply via email to