mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-20 13:09:59 +08:00
typeck.c (build_conditional_expr): Only fold if ifexp is an INTEGER_CST.
* typeck.c (build_conditional_expr): Only fold if ifexp is an INTEGER_CST. From-SVN: r22794
This commit is contained in:
parent
c3437800be
commit
3bbb73169a
@ -1,5 +1,8 @@
|
||||
1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* typeck.c (build_conditional_expr): Only fold if ifexp is an
|
||||
INTEGER_CST.
|
||||
|
||||
* decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
|
||||
instead of linkage.
|
||||
|
||||
|
@ -5345,7 +5345,7 @@ build_conditional_expr (ifexp, op1, op2)
|
||||
op2 = convert_for_initialization
|
||||
(NULL_TREE, result_type, op2, LOOKUP_NORMAL, "converting", NULL_TREE, 0);
|
||||
|
||||
if (TREE_CONSTANT (ifexp))
|
||||
if (TREE_CODE (ifexp) == INTEGER_CST)
|
||||
return integer_zerop (ifexp) ? op2 : op1;
|
||||
|
||||
return convert_from_reference
|
||||
|
Loading…
Reference in New Issue
Block a user