PR c++/26269
* decl.c (duplicate_decls): Return early if either
newdecl or olddecl is error_mark_node.
* g++.dg/other/error14.C: New test.
From-SVN: r116301
+2006-08-21 Lee Millward <lee.millward@codesourcery.com>
+
+ PR c++/26269
+ * decl.c (duplicate_decls): Return early if either
+ newdecl or olddecl is error_mark_node.
+
2006-08-20 Mark Mitchell <mark@codesourcery.com>
PR c++/28341
about the same declaration, so just pretend the types match here. */
if (TREE_TYPE (newdecl) == error_mark_node
|| TREE_TYPE (olddecl) == error_mark_node)
- types_match = 1;
+ return error_mark_node.
if (DECL_P (olddecl)
&& TREE_CODE (newdecl) == FUNCTION_DECL
+2006-08-21 Lee Millward <lee.millward@codesourcery.com>
+
+ PR c++/26269
+ * g++.dg/other/error14.C: New test.
+
2006-08-21 Olivier Hainque <hainque@adacore.com>
* gnat.dg/self_aggregate_with_zeros.adb: New test.
--- /dev/null
+//PR c++/26269
+
+void foo()
+{
+ i; // { dg-error "not declared in this scope" }
+ int i;
+}