This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31952] parameters may be redeclared in a function try-block
- From: "andrew dot stubbs at st dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Nov 2007 18:15:47 -0000
- Subject: [Bug c++/31952] parameters may be redeclared in a function try-block
- References: <bug-31952-10252@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from andrew dot stubbs at st dot com 2007-11-01 18:15 -------
It gets worse :(
The following example used to be detected by GCC 4.1.1, but is now permitted by
GCC 4.1.2, 4.2.1, 4.2.2, and 4.3-20071026, and hence is a regression.
int
foo (int bar)
try
{
return 0;
}
catch (int bar) // invalid
{
return 1;
}
-Wshadow still detects it, but it is no longer an error.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31952