Commit 2ae2031e by Richard Guenther Committed by Richard Biener

class.c (note_name_declared_in_class): Make declaration changes meaning a pedwarn.

2007-02-23  Richard Guenther  <rguenther@suse.de>

	* class.c (note_name_declared_in_class): Make declaration
	changes meaning a pedwarn.

	* g++.dg/warn/changes-meaning.C: New testcase.

From-SVN: r122255
parent 95764a8f
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
......
......@@ -6299,9 +6299,9 @@ note_name_declared_in_class (tree name, tree decl)
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);
}
}
......
2007-02-23 Richard Guenther <rguenther@suse.de>
* g++.dg/warn/changes-meaning.C: New testcase.
2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/30910
/* { 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 "" } */
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment