mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
95764a8f6e
commit
2ae2031ec1
|
@ -1,3 +1,8 @@
|
|||
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,8 +6299,8 @@ 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",
|
||||
pedwarn ("declaration of %q#D", decl);
|
||||
pedwarn ("changes meaning of %qD from %q+#D",
|
||||
DECL_NAME (OVL_CURRENT (decl)), (tree) n->value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
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
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
/* { 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 "" } */
|
||||
};
|
||||
|
Loading…
Reference in New Issue