[Bug c++/38345] New: redeclaration of name introduced in a condition
jwakely dot gcc at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Dec 1 11:55:00 GMT 2008
The example in 6.4p3 is not diagnosed by GCC:
if (int x = f()) {
int x; // ill-formed, redeclaration of x
}
else {
int x; // ill-formed, redeclaration of x
}
This compiles without warnings on every version of GCC I tried from 3.3 to 4.3
--
Summary: redeclaration of name introduced in a condition
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jwakely dot gcc at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38345
More information about the Gcc-bugs
mailing list