This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52953] g++-4.7.0 fails to detect function parameter name redeclarations.
- From: "meng at g dot clemson.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 12 Apr 2012 21:53:36 +0000
- Subject: [Bug c++/52953] g++-4.7.0 fails to detect function parameter name redeclarations.
- Auto-submitted: auto-generated
- References: <bug-52953-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52953
--- Comment #1 from meng at g dot clemson.edu 2012-04-12 21:53:36 UTC ---
another example showing violation of c++11 3.3.3/4
---------------------------- BEGIN -------------------------------
int main ()
{
if (int a = 1)
{
void a (); // 1
}
else
{
void a (); // 2
}
while (int a = 0)
{
void a (); // 3
}
for (int a = 0;;)
{
void a (); // 4
break;
}
for (; int a = 0;)
{
void a (); // 5
}
return 0;
}
---------------------------- END -------------------------------
According to my understanding, all numbered cases are illegal based on c++11
3.3.3/4.g++-4.7.0 correctly caught case 3 and 5 as compiler errors, the rest
are accepted.