diff options
author | Tom Tromey <tromey@redhat.com> | 2007-06-04 23:19:19 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2007-06-04 23:19:19 +0000 |
commit | 7114359fb661692c92e7d57f7cb96a8787eb0db3 (patch) | |
tree | 6521609daacb24a634b68fedc99b126c449c8899 /gcc/c-parser.c | |
parent | 762f7d9d8aa388aba0272677ab170741fe218260 (diff) | |
download | gcc-7114359fb661692c92e7d57f7cb96a8787eb0db3.zip gcc-7114359fb661692c92e7d57f7cb96a8787eb0db3.tar.gz gcc-7114359fb661692c92e7d57f7cb96a8787eb0db3.tar.bz2 |
c-tree.h (start_enum): Update.
* 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.
From-SVN: r125322
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 b1f40a4..39c63d5 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; |