diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-04 23:19:19 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-04 23:19:19 +0000 |
commit | 13c7079e1672dbbca3f6d56f4fde6162d4134087 (patch) | |
tree | 6521609daacb24a634b68fedc99b126c449c8899 /gcc/c-parser.c | |
parent | af592f67839fa19d582c506760ab477b9c287df6 (diff) | |
download | gcc-13c7079e1672dbbca3f6d56f4fde6162d4134087.tar.gz |
* c-tree.h (start_enum): Update.
(build_enumerator): Likewise.
* c-decl.c (enum_next_value): Removed.
(enum_overflow): Likewise.
(start_enum): Add c_enum_contents argument. Don't use globals.
(build_enumerator): Likewise.
* c-tree.h (struct c_enum_contents): New struct.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125322 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index b1f40a47faa..39c63d5945a 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -1,6 +1,6 @@ /* Parser for C and Objective-C. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. Parser actions based on the old Bison parser; structure somewhat influenced by and fragments based on the C++ parser. @@ -1698,7 +1698,8 @@ c_parser_enum_specifier (c_parser *parser) if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) { /* Parse an enum definition. */ - tree type = start_enum (ident); + struct c_enum_contents the_enum; + tree type = start_enum (&the_enum, ident); tree postfix_attrs; /* We chain the enumerators in reverse order, then put them in forward order at the end. */ @@ -1726,7 +1727,7 @@ c_parser_enum_specifier (c_parser *parser) } else enum_value = NULL_TREE; - enum_decl = build_enumerator (enum_id, enum_value); + enum_decl = build_enumerator (&the_enum, enum_id, enum_value); TREE_CHAIN (enum_decl) = values; values = enum_decl; seen_comma = false; |