aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c6
-rw-r--r--gcc/cp/parse.y10
3 files changed, 14 insertions, 8 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e8aa3add9c0..f8bb0c2667f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-27 Jason Merrill <jason@redhat.com>
+
+ * decl.c (current_binding_level): Add *&.
+ * parse.y (constructor_declarator): Fix for bison pedantry.
+ (nomods_initdcl0): Likewise.
+
2002-06-19 Akim Demaille <akim@epita.fr>
* parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index a42dd455ba3..6c9f9244669 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -478,9 +478,9 @@ struct binding_level
/* The binding level currently in effect. */
#define current_binding_level \
- (cfun && cp_function_chain->bindings \
- ? cp_function_chain->bindings \
- : scope_chain->bindings)
+ (*(cfun && cp_function_chain->bindings \
+ ? &cp_function_chain->bindings \
+ : &scope_chain->bindings))
/* The binding level of the current class, if any. */
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index 2db154a1013..653483b7ea0 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -765,7 +765,7 @@ fndef:
constructor_declarator:
nested_name_specifier SELFNAME '('
- { $$ = begin_constructor_declarator ($1, $2); }
+ { $<ttype>$ = begin_constructor_declarator ($1, $2); }
parmlist ')' cv_qualifiers exception_specification_opt
{ $$ = make_call_declarator ($<ttype>4, $5, $7, $8); }
| nested_name_specifier SELFNAME LEFT_RIGHT cv_qualifiers exception_specification_opt
@@ -773,7 +773,7 @@ constructor_declarator:
$$ = make_call_declarator ($$, empty_parms (), $4, $5);
}
| global_scope nested_name_specifier SELFNAME '('
- { $$ = begin_constructor_declarator ($2, $3); }
+ { $<ttype>$ = begin_constructor_declarator ($2, $3); }
parmlist ')' cv_qualifiers exception_specification_opt
{ $$ = make_call_declarator ($<ttype>5, $6, $8, $9); }
| global_scope nested_name_specifier SELFNAME LEFT_RIGHT cv_qualifiers exception_specification_opt
@@ -781,7 +781,7 @@ constructor_declarator:
$$ = make_call_declarator ($$, empty_parms (), $5, $6);
}
| nested_name_specifier self_template_type '('
- { $$ = begin_constructor_declarator ($1, $2); }
+ { $<ttype>$ = begin_constructor_declarator ($1, $2); }
parmlist ')' cv_qualifiers exception_specification_opt
{ $$ = make_call_declarator ($<ttype>4, $5, $7, $8); }
| nested_name_specifier self_template_type LEFT_RIGHT cv_qualifiers exception_specification_opt
@@ -789,7 +789,7 @@ constructor_declarator:
$$ = make_call_declarator ($$, empty_parms (), $4, $5);
}
| global_scope nested_name_specifier self_template_type '('
- { $$ = begin_constructor_declarator ($2, $3); }
+ { $<ttype>$ = begin_constructor_declarator ($2, $3); }
parmlist ')' cv_qualifiers exception_specification_opt
{ $$ = make_call_declarator ($<ttype>5, $6, $8, $9); }
| global_scope nested_name_specifier self_template_type LEFT_RIGHT cv_qualifiers exception_specification_opt
@@ -2080,7 +2080,7 @@ notype_initdcl0:
nomods_initdcl0:
notype_declarator maybeasm
{ /* Set things up as initdcl0_innards expects. */
- $<ttype>3 = $2;
+ $<ttype>$ = $2;
$2 = $1;
$<ftype>1.t = NULL_TREE;
$<ftype>1.lookups = NULL_TREE; }