Fix type promotion wrapping some non-trivial constant expressions

This was previously an integral type instead of a floating point type:
This commit is contained in:
William S Fulton 2017-09-18 07:06:27 +01:00
commit 9e2a12416c
13 changed files with 17 additions and 0 deletions

View file

@ -6338,6 +6338,7 @@ valexpr : exprnum { $$ = $1; }
break;
}
}
$$.type = promote($2.type, $4.type);
}
| LPAREN expr pointer RPAREN expr %prec CAST {
$$ = $5;