re PR c/46015 (-Wunused-but-set-variable warns for arrays used in gotos)
authorJakub Jelinek <jakub@redhat.com>
Mon, 18 Oct 2010 15:55:25 +0000 (17:55 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 18 Oct 2010 15:55:25 +0000 (17:55 +0200)
commit84628aa83614d863abb3a6c04f14e1b9bdd8d6aa
tree73f1a827aa5c02a91811ff646cbf751b502b7177
parent0f8d6231573675f483e50a283ccc20251b377ab4
re PR c/46015 (-Wunused-but-set-variable warns for arrays used in gotos)

PR c/46015
* c-parser.c (c_parser_statement_after_labels): Call mark_exp_read
on computed goto argument.

* semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
goto destination.

* c-c++-common/Wunused-var-13.c: New test.

From-SVN: r165643
gcc/ChangeLog
gcc/c-parser.c
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wunused-var-13.c [new file with mode: 0644]