This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
In:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-October/017449.html
we were discussing possible bugs in g++ scoping for if statements.
$ cat t.cc void foo() { if (int x = 0) { int x; } }
$ ./xgcc -B./ -c t.cc $
they expected this to produce a redeclaration error on the inner declaration
for X.
Tested on gcc version 4.4.0 20081003 (experimental) [trunk revision 140855]
(GCC)
There were other concerns about for, but, others seem to think gcc does the
right thing with them.
-- Summary: if scoping for declarations Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mrs at apple dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37728
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |