6_5_37_fp_int_promote.c (308B)
1 /* ยง6.3.1.8 usual arithmetic conversions on a mixed FP/int operand pair. 2 * The integer side is promoted to the common FP type (here `double`) 3 * before BO_FADD runs. */ 4 int test_main(void) { 5 int n = 40; 6 double d = 2.0; 7 /* n is converted to double, then 40.0 + 2.0 = 42.0. */ 8 return (int)(n + d); 9 }