aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parse.y
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1994-06-03 21:42:31 +0000
committerMike Stump <mrs@gcc.gnu.org>1994-06-03 21:42:31 +0000
commita0a339271ae588299147928769ca073a198d53c7 (patch)
tree2bfb1009d1a11061dfd6aad7e84a40e551c0af50 /gcc/cp/parse.y
parent5345f91a0be605ab09f2f42abecd1a0fc5083f47 (diff)
downloadgcc-a0a339271ae588299147928769ca073a198d53c7.zip
gcc-a0a339271ae588299147928769ca073a198d53c7.tar.gz
gcc-a0a339271ae588299147928769ca073a198d53c7.tar.bz2
39th Cygnus<->FSF merge
From-SVN: r7439
Diffstat (limited to 'gcc/cp/parse.y')
-rw-r--r--gcc/cp/parse.y15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index 30e076c..cb2046d 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -543,11 +543,12 @@ datadef:
&& TREE_PURPOSE (t) == NULL_TREE)
{
t = TREE_VALUE (t);
- if (TREE_CODE (t) == RECORD_TYPE)
+ if (IS_AGGR_TYPE (t)
+ && IDENTIFIER_TEMPLATE (TYPE_IDENTIFIER (t)))
{
if (CLASSTYPE_USE_TEMPLATE (t) == 0)
- CLASSTYPE_USE_TEMPLATE (t) = 2;
- else if (CLASSTYPE_USE_TEMPLATE (t) == 1)
+ SET_CLASSTYPE_TEMPLATE_SPECIALIZATION (t);
+ else if (CLASSTYPE_TEMPLATE_INSTANTIATION (t))
error ("override declaration for already-expanded template");
}
}
@@ -2914,14 +2915,18 @@ absdcl:
{ $$ = make_pointer_declarator ($2, $3); }
| '*' absdcl
{ $$ = make_pointer_declarator (NULL_TREE, $2); }
- | '*' type_quals %prec EMPTY
+ | '*' nonempty_type_quals %prec EMPTY
{ $$ = make_pointer_declarator ($2, NULL_TREE); }
+ | '*' %prec EMPTY
+ { $$ = make_pointer_declarator (NULL_TREE, NULL_TREE); }
| '&' nonempty_type_quals absdcl
{ $$ = make_reference_declarator ($2, $3); }
| '&' absdcl
{ $$ = make_reference_declarator (NULL_TREE, $2); }
- | '&' type_quals %prec EMPTY
+ | '&' nonempty_type_quals %prec EMPTY
{ $$ = make_reference_declarator ($2, NULL_TREE); }
+ | '&' %prec EMPTY
+ { $$ = make_reference_declarator (NULL_TREE, NULL_TREE); }
| ptr_to_mem type_quals %prec EMPTY
{ tree arg = make_pointer_declarator ($2, NULL_TREE);
$$ = build_parse_node (SCOPE_REF, $1, arg);