+2007-02-23 Richard Guenther <rguenther@suse.de>
+
+ * class.c (note_name_declared_in_class): Make declaration
+ changes meaning a pedwarn.
+
2007-02-22 Michael Matz <matz@suse.de>
PR c++/29433
A name N used in a class S shall refer to the same declaration
in its context and when re-evaluated in the completed scope of
S. */
- error ("declaration of %q#D", decl);
- error ("changes meaning of %qD from %q+#D",
- DECL_NAME (OVL_CURRENT (decl)), (tree) n->value);
+ pedwarn ("declaration of %q#D", decl);
+ pedwarn ("changes meaning of %qD from %q+#D",
+ DECL_NAME (OVL_CURRENT (decl)), (tree) n->value);
}
}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fpermissive" } */
+
+template <class _Tp> class auto_ptr {}; /* { dg-warning "changes meaning" } */
+template <class _Tp>
+class counted_ptr
+{
+public:
+ auto_ptr<_Tp> auto_ptr(); /* { dg-warning "" } */
+};
+