summaryrefslogtreecommitdiff
path: root/gcc/cp/parse.y
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2002-02-22 11:57:52 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2002-02-22 11:57:52 +0000
commit4f2b0fb25ec488b47631bf988c8d099524caddb5 (patch)
tree15da02c0132151ee69a9aaeb4e66a7b7b3df0c9e /gcc/cp/parse.y
parent54fec3d54ad98245f71154255bd77099f39f9edb (diff)
downloadgcc-4f2b0fb25ec488b47631bf988c8d099524caddb5.tar.gz
PR c++/2645, DR 295
cp: PR c++/2645, DR 295 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals, tf_keep_type_decl. (make_typename_type): Use tsubst_flags_t. * decl.c (make_typename_type): Adjust. Return non-artificial TYPE_DECLs, if required. (grokdeclarator): Simplify CVR qualification handling. Allow bad qualifiers on typedef types. * decl2.c (handle_class_head): Adjust make_typename_type call. * parse.y (nested_name_specifier): Likewise. (typename_sub0): Likewise. (typename_sub1): Likewise. * pt.c (convert_template_argument): Adjust make_typename_type return value. (tsubst): Adjust cp_build_qualified_type_real calls. (check_cv_quals_for_unify): Cope with alowing bad qualifications on template type parms. (instantiate_decl): Recheck substitutions to give warnings on bad qualifications. * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals. testsuite: * g++.dg/template/qualttp19.C: New test. * g++.dg/template/qualttp20.C: New test. * g++.old-deja/g++.jason/report.C: Adjust expected errors * g++.old-deja/g++.other/qual1.C: Likewise. From-SVN: r49961
Diffstat (limited to 'gcc/cp/parse.y')
-rw-r--r--gcc/cp/parse.y18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index 54a6823a616..e6bdc9a1f2e 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -3029,14 +3029,14 @@ nested_name_specifier:
{ $$ = $2; }
| nested_name_specifier TEMPLATE explicit_template_type SCOPE
{ got_scope = $$
- = make_typename_type ($1, $3, /*complain=*/1); }
+ = make_typename_type ($1, $3, tf_error); }
/* Error handling per Core 125. */
| nested_name_specifier IDENTIFIER SCOPE
{ got_scope = $$
- = make_typename_type ($1, $2, /*complain=*/1); }
+ = make_typename_type ($1, $2, tf_error); }
| nested_name_specifier PTYPENAME SCOPE
{ got_scope = $$
- = make_typename_type ($1, $2, /*complain=*/1); }
+ = make_typename_type ($1, $2, tf_error); }
;
/* Why the @#$%^& do type_name and notype_identifier need to be expanded
@@ -3078,7 +3078,7 @@ typename_sub0:
typename_sub1 identifier %prec EMPTY
{
if (TYPE_P ($1))
- $$ = make_typename_type ($1, $2, /*complain=*/1);
+ $$ = make_typename_type ($1, $2, tf_error);
else if (TREE_CODE ($2) == IDENTIFIER_NODE)
error ("`%T' is not a class or namespace", $2);
else
@@ -3091,9 +3091,9 @@ typename_sub0:
| typename_sub1 template_type %prec EMPTY
{ $$ = TREE_TYPE ($2); }
| typename_sub1 explicit_template_type %prec EMPTY
- { $$ = make_typename_type ($1, $2, /*complain=*/1); }
+ { $$ = make_typename_type ($1, $2, tf_error); }
| typename_sub1 TEMPLATE explicit_template_type %prec EMPTY
- { $$ = make_typename_type ($1, $3, /*complain=*/1); }
+ { $$ = make_typename_type ($1, $3, tf_error); }
;
typename_sub1:
@@ -3107,7 +3107,7 @@ typename_sub1:
| typename_sub1 typename_sub2
{
if (TYPE_P ($1))
- $$ = make_typename_type ($1, $2, /*complain=*/1);
+ $$ = make_typename_type ($1, $2, tf_error);
else if (TREE_CODE ($2) == IDENTIFIER_NODE)
error ("`%T' is not a class or namespace", $2);
else
@@ -3119,10 +3119,10 @@ typename_sub1:
}
| typename_sub1 explicit_template_type SCOPE
{ got_scope = $$
- = make_typename_type ($1, $2, /*complain=*/1); }
+ = make_typename_type ($1, $2, tf_error); }
| typename_sub1 TEMPLATE explicit_template_type SCOPE
{ got_scope = $$
- = make_typename_type ($1, $3, /*complain=*/1); }
+ = make_typename_type ($1, $3, tf_error); }
;
/* This needs to return a TYPE_DECL for simple names so that we don't