Summary: | [4.2 regression] bogus "statement with no effect" warning with VLA and typeof | ||
---|---|---|---|
Product: | gcc | Reporter: | Martin Michlmayr <tbm> |
Component: | c | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | debian-gcc, fche, gcc-bugs, mikestump |
Priority: | P2 | Keywords: | diagnostic |
Version: | 4.2.0 | ||
Target Milestone: | 4.2.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2006-07-06 15:13:05 |
Description
Martin Michlmayr
2006-07-06 09:13:53 UTC
This is not a debug issue. We are warning inside the typeof. Here is a shorter testcase: void f(__SIZE_TYPE__ d) { typedef int t[d]; t *g = (__typeof(g))d; } Most likely caused by: 2006-05-18 Mike Stump <mrs@apple.com> Fix up vla, vm and [*] sematics. Fix submitted. Subject: Bug 28280 Author: mrs Date: Wed Jul 12 13:12:08 2006 New Revision: 115369 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115369 Log: PR c/28280 * c-parser.c (c_parser_typeof_specifier): Don't use c_finish_expr_stmt, open code desired semantics instead. Added: trunk/gcc/testsuite/gcc.dg/vla-9.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-parser.c I have checked in a fix for this. Fixed. Subject: Bug 28280 Author: mrs Date: Sat Jul 15 17:03:44 2006 New Revision: 115479 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115479 Log: Revert: PR c/28280 * c-parser.c (c_parser_typeof_specifier): Don't use c_finish_expr_stmt, open code desired semantics instead. Removed: trunk/gcc/testsuite/gcc.dg/vla-9.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-parser.c THis bug should be reopened. Reopening because Mike cannot do it himself as he does not know the trick of using his @gcc.gnu.org. The patch http://gcc.gnu.org/ml/gcc-patches/2006-07/txt00017.txt is OK. Subject: Bug 28280 Author: mrs Date: Tue Aug 15 18:01:19 2006 New Revision: 116163 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116163 Log: PR c/28280 * c-parser.c (c_parser_typeof_specifier): Don't use c_finish_expr_stmt, open code desired semantics instead. Added: trunk/gcc/testsuite/gcc.dg/vla-9.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-parser.c Fixed. |