[LLVMbugs] [Bug 12294] Clang does not make a for-init-declaration hide a class-name
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Mar 17 06:54:40 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12294
Johannes Schaub <schaub.johannes at googlemail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Johannes Schaub <schaub.johannes at googlemail.com> 2012-03-17 08:54:40 CDT ---
I think I see now that "redeclared" here does not mean to actually redeclare
that name, but just means to have a declaration declare the same identifier
(gcc and clang still allow class names to redeclare it - i.e if I omit "i++",
both accept the code. I think I can't explain that behavior). Clause 3.3.3p4
says that these declarations are "local to the for/... loop", which I think
means the loop creates an implicit block scope.
So I'm closing this, but I would be glad if you could clear up why clang allows
the class-name declaration of "i".
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list