This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/2288: Redereclaration not diagnosed.
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2288: Redereclaration not diagnosed.
- From: gdr at codesourcery dot com
- Date: 14 Mar 2001 14:55:25 -0000
- Cc: gdr at codesourcery dot com, jbourguet at free dot fr, vincent dot martinez at geomath dot fr
- Reply-To: gdr at codesourcery dot com
>Number: 2288
>Category: c++
>Synopsis: Redereclaration not diagnosed.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Wed Mar 14 06:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Gabriel Dos Reis, from a discussion on fr.comp.lang.c++
>Release: gcc-2.95 and gcc-3_0 are affected
>Organization:
>Environment:
Immaterial
>Description:
g++ fails to diagnose the program construct below.
The redeclaration in the controled-statement is ill-formed
as per 3.3.2/4.
>How-To-Repeat:
#include <iostream>
int main()
{
for (int i = 0; i < 10; ++i)
{
int i = 5;
std::cout << i << std::endl;
}
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: