diff options
author | Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> | 2011-01-17 22:34:26 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-01-17 17:34:26 -0500 |
commit | 86070dcc8ad910ef16423c775c10fe6883239d01 (patch) | |
tree | 5118380ada55b5e2b38099f298995d0244001c2e /gcc | |
parent | c7d3bb7623a428af85bd04c7f225ed54241c29bd (diff) | |
download | gcc-86070dcc8ad910ef16423c775c10fe6883239d01.zip gcc-86070dcc8ad910ef16423c775c10fe6883239d01.tar.gz gcc-86070dcc8ad910ef16423c775c10fe6883239d01.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/parser.c | 9 |
2 files changed, 5 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e7b45b4..2f858e0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-01-14 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> + + * parser.c (cp_parser_range_for): Remove the "unused variable" warning + workaround. + 2011-01-15 Giovanni Funchal <gafunchal@gmail.com> Jonathan Wakely <jwakely.gcc@gmail.com> diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 061e8cc..41f82ac 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; |