diff options
author | Arnaud Charlet <charlet@adacore.com> | 2010-09-08 06:12:55 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-09-08 08:12:55 +0200 |
commit | 7370e0da63c435435889f8d752836a436ef476bf (patch) | |
tree | 2c841516224256edebe9f4583216e9213ec8260a /gcc/c-decl.c | |
parent | e0d4c0b3e5dd120db562995f8d3ba99885012c73 (diff) | |
download | gcc-7370e0da63c435435889f8d752836a436ef476bf.zip gcc-7370e0da63c435435889f8d752836a436ef476bf.tar.gz gcc-7370e0da63c435435889f8d752836a436ef476bf.tar.bz2 |
c-tree.h, c-decl.c (build_enumerator): Add location parameter.
* c-tree.h, c-decl.c (build_enumerator): Add location parameter.
* c-parser.c (c_parser_enum_specifier): Adjust call to build_enumerator.
From-SVN: r163988
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 10600c8..c7babb5 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -7343,12 +7343,13 @@ finish_enum (tree enumtype, tree values, tree attributes) /* Build and install a CONST_DECL for one value of the current enumeration type (one that was begun with start_enum). - LOC is the location of the enumerator. + DECL_LOC is the location of the enumerator. + LOC is the location of the '=' operator if any, DECL_LOC otherwise. Return a tree-list containing the CONST_DECL and its value. Assignment of sequential values by default is handled here. */ tree -build_enumerator (location_t loc, +build_enumerator (location_t decl_loc, location_t loc, struct c_enum_contents *the_enum, tree name, tree value) { tree decl, type; @@ -7436,7 +7437,7 @@ build_enumerator (location_t loc, >= TYPE_PRECISION (integer_type_node) && TYPE_UNSIGNED (type))); - decl = build_decl (loc, CONST_DECL, name, type); + decl = build_decl (decl_loc, CONST_DECL, name, type); DECL_INITIAL (decl) = convert (type, value); pushdecl (decl); |