diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-08 06:12:55 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-08 06:12:55 +0000 |
commit | 5a7ce2eccce338fb335318e52dd44ecb247b6833 (patch) | |
tree | 2c841516224256edebe9f4583216e9213ec8260a /gcc/c-parser.c | |
parent | f79801f29f1da0b35a857bf123a3e9fdbdd07d71 (diff) | |
download | gcc-5a7ce2eccce338fb335318e52dd44ecb247b6833.tar.gz |
* c-tree.h, c-decl.c (build_enumerator): Add location parameter.
* c-parser.c (c_parser_enum_specifier): Adjust call to build_enumerator.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163988 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 13e63502f32..666f4188f98 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -1833,7 +1833,7 @@ c_parser_enum_specifier (c_parser *parser) bool seen_comma; c_token *token; location_t comma_loc = UNKNOWN_LOCATION; /* Quiet warning. */ - location_t value_loc; + location_t decl_loc, value_loc; if (c_parser_next_token_is_not (parser, CPP_NAME)) { c_parser_error (parser, "expected identifier"); @@ -1845,7 +1845,7 @@ c_parser_enum_specifier (c_parser *parser) enum_id = token->value; /* Set the location in case we create a decl now. */ c_parser_set_source_position_from_token (token); - value_loc = token->location; + decl_loc = value_loc = token->location; c_parser_consume_token (parser); if (c_parser_next_token_is (parser, CPP_EQ)) { @@ -1855,7 +1855,7 @@ c_parser_enum_specifier (c_parser *parser) } else enum_value = NULL_TREE; - enum_decl = build_enumerator (value_loc, + enum_decl = build_enumerator (decl_loc, value_loc, &the_enum, enum_id, enum_value); TREE_CHAIN (enum_decl) = values; values = enum_decl; |