[Bug c++/41779] Spurious integral promotion

2009-12-31 Thread zweije at xs4all dot nl
--- Comment #2 from zweije at xs4all dot nl 2009-12-31 11:01 --- I beg to differ. I cannot find where the standard says that unsigned short *always* promotes to int in rvalue contexts. My reading in more detail is: 1. The value of y is an lvalue of type unsigned short (5.1/7). 2. 1

[Bug c++/41779] Spurious integral promotion

2009-12-29 Thread foo at mailinator dot com
--- Comment #1 from foo at mailinator dot com 2009-12-29 18:02 --- 5/9 (usual arithmetic conversions) isn't relevant until after 4.5/1 (integral promotions) has happened. Unsigned short *always* promotes to int in rvalue contexts; then *that* int is implicitly converted to double in the