+2005-09-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ Backport:
+
+ 2004-11-25 Mark Mitchell <mark@codesourcery.com>
+ PR c++/18445
+ * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
+ unknown_type as non matching.
+ * pt.c (build_non_dependent_expr): Do not build a
+ NON_DEPENDENT_EXPR for a VAR_DECL.
+
2005-09-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
Backport:
if (TREE_CODE (rhs) == BASELINK)
rhs = BASELINK_FUNCTIONS (rhs);
+ /* If we are in a template, and have a NON_DEPENDENT_EXPR, we cannot
+ deduce any type information. */
+ if (TREE_CODE (rhs) == NON_DEPENDENT_EXPR)
+ {
+ if (flags & tf_error)
+ error ("not enough type information");
+ return error_mark_node;
+ }
+
/* We don't overwrite rhs if it is an overloaded function.
Copying it would destroy the tree link. */
if (TREE_CODE (rhs) != OVERLOAD)
|| TREE_CODE (inner_expr) == TEMPLATE_ID_EXPR
|| TREE_CODE (inner_expr) == OFFSET_REF)
return expr;
+ /* There is no need to return a proxy for a variable. */
+ if (TREE_CODE (expr) == VAR_DECL)
+ return expr;
/* Preserve string constants; conversions from string constants to
"char *" are allowed, even though normally a "const char *"
cannot be used to initialize a "char *". */
+2005-09-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ Backport:
+
+ 2004-11-25 Mark Mitchell <mark@codesourcery.com>
+ PR c++/18445
+ * g++.dg/template/crash28.C: New test.
+
2005-09-01 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/23478
void f()
{
a ex;
- g(ex.what); // { dg-error "" }
+ g(ex.what); // { dg-error "not enough type information" }
}