aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorDirk Mueller <dmueller@suse.de>2007-02-05 12:43:17 +0000
committerDirk Mueller <mueller@gcc.gnu.org>2007-02-05 12:43:17 +0000
commit583c0b0549d793680d98ef9dc394a9b8d2fda6aa (patch)
tree99ef41c534a5dd8def11fc9a57354d90ace6e61f /gcc/cp/parser.c
parent55d6f63112dada0287fd21d4c61bd8e8d0992a39 (diff)
downloadgcc-583c0b0549d793680d98ef9dc394a9b8d2fda6aa.zip
gcc-583c0b0549d793680d98ef9dc394a9b8d2fda6aa.tar.gz
gcc-583c0b0549d793680d98ef9dc394a9b8d2fda6aa.tar.bz2
re PR bootstrap/30510 (Gcc failed to bootstrap)
2007-02-05 Dirk Mueller <dmueller@suse.de> PR bootstrap/30510 * parser.c (cp_parser_class_specifier): Always initialize bases. From-SVN: r121596
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index f7bff07..6aef931 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -13398,6 +13398,10 @@ cp_parser_class_specifier (cp_parser* parser)
class-key attributes nested-name-specifier [opt] template-id
base-clause [opt]
+ Upon return BASES is initialized to the list of base classes (or
+ NULL, if there are none) in the same form returned by
+ cp_parser_base_clause.
+
Returns the TYPE of the indicated class. Sets
*NESTED_NAME_SPECIFIER_P to TRUE iff one of the productions
involving a nested-name-specifier was used, and FALSE otherwise.
@@ -13432,6 +13436,8 @@ cp_parser_class_head (cp_parser* parser,
type. */
num_templates = 0;
+ *bases = NULL_TREE;
+
/* Look for the class-key. */
class_key = cp_parser_class_key (parser);
if (class_key == none_type)
@@ -13722,7 +13728,6 @@ cp_parser_class_head (cp_parser* parser,
struct A::C : B {};
is valid. */
- *bases = NULL_TREE;
/* Get the list of base-classes, if there is one. */
if (cp_lexer_next_token_is (parser->lexer, CPP_COLON))