OSDN Git Service

PR c/41182
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Oct 2009 00:32:51 +0000 (00:32 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Oct 2009 00:32:51 +0000 (00:32 +0000)
commitf59e3889ea6444910a44c3099649d3ce9e1d72d1
treefd81fa90e7923181957eb30dcbb964a2a29c5e9d
parent89058766df586993143409c033b66801d3e3d7b9
PR c/41182
* c-common.c (c_fully_fold_internal): Strip nops from the result
of recursive calls to c_fully_fold_internal.
(c_wrap_maybe_const): New.
(c_save_expr): Use c_wrap_maybe_const.
* c-common.h (c_wrap_maybe_const): Declare.
* c-typeck.c (build_conditional_expr, c_finish_stmt_expr,
build_binary_op): Use c_wrap_maybe_const.

testsuite:
* gcc.c-torture/compile/pr41182-1.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152548 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-common.c
gcc/c-common.h
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr41182-1.c [new file with mode: 0644]