re PR debug/83547 ((statement-frontiers) error: void value not ignored as it ought...
authorJakub Jelinek <jakub@redhat.com>
Fri, 22 Dec 2017 18:01:58 +0000 (19:01 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 22 Dec 2017 18:01:58 +0000 (19:01 +0100)
commit11d29d639f4b60f51a593932529be6895b613d4c
tree55a89f9b5c3f9d9950784154e055bf77d09d5457
parentd7727ce400380aaf26fb915d31dcbd98a761e2c0
re PR debug/83547 ((statement-frontiers) error: void value not ignored as it ought to be)

PR debug/83547
* tree-iterator.c (alloc_stmt_list): Start with cleared
TREE_SIDE_EFFECTS regardless whether a new STATEMENT_LIST is allocated
or old one reused.
c/
* c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
and consider empty ones if there are no other stmts.  For
-Wunused-value walk all statements before the one only followed by
DEBUG_BEGIN_STMTs.
testsuite/
* gcc.c-torture/compile/pr83547.c: New test.

From-SVN: r255980
gcc/ChangeLog
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr83547.c [new file with mode: 0644]
gcc/tree-iterator.c