+2007-01-10 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/28999
+ * decl.c (make_typename_type): If the qualified name is not a
+ type, issue an error.
+ * parser.c (cp_parser_elaborated_type_specifier): Fix comment
+ formatting.
+
2007-01-08 Geoffrey Keating <geoffk@apple.com>
* rtti.c: Include target.h.
name = TREE_OPERAND (name, 0);
if (TREE_CODE (name) == TEMPLATE_DECL)
name = TREE_OPERAND (fullname, 0) = DECL_NAME (name);
+ else if (TREE_CODE (name) == OVERLOAD)
+ {
+ error ("%qD is not a type", name);
+ return error_mark_node;
+ }
}
if (TREE_CODE (name) == TEMPLATE_DECL)
{
parser->integral_constant_expression_p = true;
parser->allow_non_integral_constant_expression_p = allow_non_constant_p;
parser->non_integral_constant_expression_p = false;
+ integral_constant_expr_p = true;
/* Although the grammar says "conditional-expression", we parse an
"assignment-expression", which also permits "throw-expression"
and the use of assignment operators. In the case that
constant. */
expression = cp_parser_assignment_expression (parser, /*cast_p=*/false);
/* Restore the old settings. */
+ integral_constant_expr_p = false;
parser->integral_constant_expression_p
= saved_integral_constant_expression_p;
parser->allow_non_integral_constant_expression_p
/*check_dependency_p=*/true,
/*type_p=*/true,
is_declaration);
- /* For everything but enumeration types, consider a template-id. */
- /* For an enumeration type, consider only a plain identifier. */
+ /* For everything but enumeration types, consider a template-id.
+ For an enumeration type, consider only a plain identifier. */
if (tag_type != enum_type)
{
bool template_p = false;
+2007-01-10 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/28999
+ * g++.dg/template/typename11.C: New test.
+
2007-01-10 Robert Kennedy <jimbob@google.com>
* gcc.dg/fold-compare-2.c: New test case for fold_comparison.