Commit 8da15291 by Gabriel Dos Reis Committed by Gabriel Dos Reis

parser.c (cp_parser_make_typename_type): Call make_typename_type with tf_none…

parser.c (cp_parser_make_typename_type): Call make_typename_type with tf_none instead of magic value 0.

        * parser.c (cp_parser_make_typename_type): Call make_typename_type
        with tf_none instead of magic value 0.
        (cp_parser_explicit_instantiation): Call do_type_instantiation
        with tf_error instead of magic value 1.
        (cp_parser_elaborated_type_specifier): Call make_typename_type
        with tf_error instead of magic value 1.
        (cp_parser_class_name): Likewise.
        (cp_parser_lookup_name): Likewise.

From-SVN: r107855
parent e45b3c75
2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net> 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
* parser.c (cp_parser_make_typename_type): Call make_typename_type
with tf_none instead of magic value 0.
(cp_parser_explicit_instantiation): Call do_type_instantiation
with tf_error instead of magic value 1.
(cp_parser_elaborated_type_specifier): Call make_typename_type
with tf_error instead of magic value 1.
(cp_parser_class_name): Likewise.
(cp_parser_lookup_name): Likewise.
2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
* parser.c (cp_parser_declaration): Set token2.type to CPP_EOF, * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
not RID_MAX. not RID_MAX.
......
...@@ -2417,7 +2417,7 @@ cp_parser_make_typename_type (cp_parser *parser, tree scope, tree id) ...@@ -2417,7 +2417,7 @@ cp_parser_make_typename_type (cp_parser *parser, tree scope, tree id)
if (TREE_CODE (id) == IDENTIFIER_NODE) if (TREE_CODE (id) == IDENTIFIER_NODE)
{ {
result = make_typename_type (scope, id, typename_type, result = make_typename_type (scope, id, typename_type,
/*complain=*/0); /*complain=*/tf_none);
if (result == error_mark_node) if (result == error_mark_node)
cp_parser_diagnose_invalid_type_name (parser, scope, id); cp_parser_diagnose_invalid_type_name (parser, scope, id);
return result; return result;
...@@ -9243,7 +9243,8 @@ cp_parser_explicit_instantiation (cp_parser* parser) ...@@ -9243,7 +9243,8 @@ cp_parser_explicit_instantiation (cp_parser* parser)
template instantiation. */ template instantiation. */
pop_deferring_access_checks (); pop_deferring_access_checks ();
if (type) if (type)
do_type_instantiation (type, extension_specifier, /*complain=*/1); do_type_instantiation (type, extension_specifier,
/*complain=*/tf_error);
} }
else else
{ {
...@@ -9953,7 +9954,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, ...@@ -9953,7 +9954,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser,
&& tag_type == typename_type) && tag_type == typename_type)
type = make_typename_type (parser->scope, decl, type = make_typename_type (parser->scope, decl,
typename_type, typename_type,
/*complain=*/1); /*complain=*/tf_error);
else else
type = TREE_TYPE (decl); type = TREE_TYPE (decl);
} }
...@@ -12588,7 +12589,8 @@ cp_parser_class_name (cp_parser *parser, ...@@ -12588,7 +12589,8 @@ cp_parser_class_name (cp_parser *parser,
/* If this is a typename, create a TYPENAME_TYPE. */ /* If this is a typename, create a TYPENAME_TYPE. */
if (typename_p && decl != error_mark_node) if (typename_p && decl != error_mark_node)
{ {
decl = make_typename_type (scope, decl, typename_type, /*complain=*/1); decl = make_typename_type (scope, decl, typename_type,
/*complain=*/tf_error);
if (decl != error_mark_node) if (decl != error_mark_node)
decl = TYPE_NAME (decl); decl = TYPE_NAME (decl);
} }
...@@ -14609,7 +14611,7 @@ cp_parser_lookup_name (cp_parser *parser, tree name, ...@@ -14609,7 +14611,7 @@ cp_parser_lookup_name (cp_parser *parser, tree name,
A::B' should be considered a type-name, even if `A' A::B' should be considered a type-name, even if `A'
is dependent. */ is dependent. */
type = make_typename_type (parser->scope, name, tag_type, type = make_typename_type (parser->scope, name, tag_type,
/*complain=*/1); /*complain=*/tf_error);
decl = TYPE_NAME (type); decl = TYPE_NAME (type);
} }
else if (is_template else if (is_template
...@@ -14618,7 +14620,7 @@ cp_parser_lookup_name (cp_parser *parser, tree name, ...@@ -14618,7 +14620,7 @@ cp_parser_lookup_name (cp_parser *parser, tree name,
CPP_CLOSE_PAREN))) CPP_CLOSE_PAREN)))
decl = make_unbound_class_template (parser->scope, decl = make_unbound_class_template (parser->scope,
name, NULL_TREE, name, NULL_TREE,
/*complain=*/1); /*complain=*/tf_error);
else else
decl = build_qualified_name (/*type=*/NULL_TREE, decl = build_qualified_name (/*type=*/NULL_TREE,
parser->scope, name, parser->scope, name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment