[Bug c++/31952] New: parameters may be redeclared in a function try-block
andrew dot stubbs at st dot com
gcc-bugzilla@gcc.gnu.org
Wed May 16 13:13:00 GMT 2007
According to the C++ standard, clause 3.3.2, paragraph 2, sentence 3, the
following program should be invalid:
int
foo (int bar)
try
{
return 0;
}
catch (...)
{
int bar = 0; // invalid
return 1;
}
Specifically, `bar' may not be redeclared in the outermost block of a handler
in a function try-block.
GCC 4.1.1 gives no errors or warnings (other than unused parameters and
variables).
--
Summary: parameters may be redeclared in a function try-block
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andrew dot stubbs at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31952
More information about the Gcc-bugs
mailing list