diff options
author | Richard Guenther <rguenther@suse.de> | 2007-02-23 11:08:39 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-02-23 11:08:39 +0000 |
commit | 2ae2031ec142e650cf93c07963051f14a3426db0 (patch) | |
tree | 994ce138abb4fffb3db148fde13de27fbab1ef9a /gcc/cp/class.c | |
parent | 95764a8f6e0e48600168618f6f99233654a6ac8e (diff) | |
download | gcc-2ae2031ec142e650cf93c07963051f14a3426db0.zip gcc-2ae2031ec142e650cf93c07963051f14a3426db0.tar.gz gcc-2ae2031ec142e650cf93c07963051f14a3426db0.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 0f19b67..f24a2fe 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -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); } } |