From 86070dcc8ad910ef16423c775c10fe6883239d01 Mon Sep 17 00:00:00 2001 From: Rodrigo Rivas Costa Date: Mon, 17 Jan 2011 22:34:26 +0000 Subject: [PATCH] parser.c (cp_parser_range_for): Remove the "unused variable" warning workaround. * parser.c (cp_parser_range_for): Remove the "unused variable" warning workaround. From-SVN: r168936 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/parser.c | 9 --------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e7b45b4830b..2f858e06207 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-01-14 Rodrigo Rivas Costa + + * parser.c (cp_parser_range_for): Remove the "unused variable" warning + workaround. + 2011-01-15 Giovanni Funchal Jonathan Wakely diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 061e8cc7fee..41f82ac4747 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -8760,15 +8760,6 @@ cp_parser_range_for (cp_parser *parser, tree scope, tree init, tree range_decl) { tree stmt, range_expr; - /* If the variable from a range-for is not actually used, GCC would issue - "unused variable" warnings, and the user could do little to prevent them. - So we always mark it as used. */ - if (range_decl != error_mark_node) - { - TREE_USED (range_decl) = 1; - DECL_READ_P (range_decl) = 1; - } - if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)) { bool expr_non_constant_p; -- 2.30.2