+2004-05-22 Roger Sayle <roger@eyesopen.com>
+
+ * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
+ returning when TREE_TYPE is error_mark_node.
+ * typeck.c (require_complete_type): Return error_mark_node if
+ value's type is an error_mark_node.
+
2005-05-20 Andrew Pinski <pinskia@physics.uc.edu>
* optimize.c (calls_setjmp_r): Remove.
return decl;
DECL_ERROR_REPORTED (decl) = 1;
+
+ if (TREE_TYPE (decl) == error_mark_node)
+ return decl;
+
if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (decl)))
{
error ("name lookup of `%D' changed for new ISO `for' scoping",
else
type = TREE_TYPE (value);
+ if (type == error_mark_node)
+ return error_mark_node;
+
/* First, detect a valid value with a complete type. */
if (COMPLETE_TYPE_P (type))
return value;
+2004-05-22 Wolfgang Bangerth <bangerth@dealii.org>
+ Roger Sayle <roger@eyesopen.com>
+
+ * g++.dg/lookup/forscope2.C: New test case.
+
2004-05-22 Ben Elliston <bje@au.ibm.com>
* gcc.dg/cpp/Wmissingdirs.c: New.
--- /dev/null
+// { dg-do compile }
+
+struct S {
+ void foo() {
+ for (_ptr; ;) {} // { dg-error "not declared" }
+ _ptr = 0;
+ }
+};
+