Summary: | [8 Regression] (statement-frontiers) error: void value not ignored as it ought to be | ||
---|---|---|---|
Product: | gcc | Reporter: | Markus Trippelsdorf <trippels> |
Component: | debug | Assignee: | Jakub Jelinek <jakub> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aoliva, rsandifo |
Priority: | P1 | Keywords: | rejects-valid |
Version: | 8.0 | ||
Target Milestone: | 8.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2017-12-22 00:00:00 | |
Attachments: | gcc8-pr83547.patch |
Description
Markus Trippelsdorf
2017-12-22 07:12:16 UTC
Created attachment 42951 [details] gcc8-pr83547.patch Untested fix. *** Bug 83539 has been marked as a duplicate of this bug. *** Author: jakub Date: Fri Dec 22 18:01:58 2017 New Revision: 255980 URL: https://gcc.gnu.org/viewcvs?rev=255980&root=gcc&view=rev Log: 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. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr83547.c Modified: trunk/gcc/ChangeLog trunk/gcc/c/ChangeLog trunk/gcc/c/c-typeck.c trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-iterator.c Fixed. |