PR c++/20552
Backport:
2004-03-08 Mark Mitchell <mark@codesourcery.com>
* decl.c (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
* g++.dg/ext/typeof10.C: New test.
From-SVN: r108795
+2005-12-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/20552
+ Backport:
+ 2004-03-08 Mark Mitchell <mark@codesourcery.com>
+
+ * decl.c (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
+
2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/19397
else
return NULL_TREE;
}
-
- /* Already complained about this, so don't do so again. */
- else if (current_class_type == NULL_TREE
- || IDENTIFIER_ERROR_LOCUS (DECL_ASSEMBLER_NAME (newdecl)) != current_class_type)
+ else
{
error ("conflicting declaration '%#D'", newdecl);
cp_error_at ("'%D' has a previous declaration as `%#D'",
+2005-12-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/20552
+ * g++.dg/ext/typeof10.C: New test.
+
2005-12-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.old-deja/g++.brendan/redecl1.C,
--- /dev/null
+// PR c++/20552
+// Origin: Ivan Godard <igodard@pacbell.net>
+
+template<int> struct A
+{
+ void foo()
+ {
+ typedef int T; // { dg-error "previous" }
+ typedef __typeof__(*this) T; // { dg-error "conflicting" }
+ }
+};