public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46791] New: GCC fails on "for(struct { } f;;) ;", incorrectly treating it as a range-based for loop
@ 2010-12-03 20:02 schaub-johannes at web dot de
2010-12-03 22:32 ` [Bug c++/46791] [4.6 Regression] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: schaub-johannes at web dot de @ 2010-12-03 20:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46791
Summary: GCC fails on "for(struct { } f;;) ;", incorrectly
treating it as a range-based for loop
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: schaub-johannes@web.de
The following has worked correctly before, but doesn't work anymore with GCC's
range-based for-loop support enabled
void f() {
for(struct { } f;;) ;
}
error: types may not be defined in range-based for loops
Structs in the initial part of the for loop can be useful and they are broken
by that diagnostic.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/46791] [4.6 Regression] GCC fails on "for(struct { } f;;) ;", incorrectly treating it as a range-based for loop
2010-12-03 20:02 [Bug c++/46791] New: GCC fails on "for(struct { } f;;) ;", incorrectly treating it as a range-based for loop schaub-johannes at web dot de
@ 2010-12-03 22:32 ` rguenth at gcc dot gnu.org
2011-01-03 20:33 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-12-03 22:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46791
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Target Milestone|--- |4.6.0
Summary|GCC fails on "for(struct { |[4.6 Regression] GCC fails
|} f;;) ;", incorrectly |on "for(struct { } f;;) ;",
|treating it as a |incorrectly treating it as
|range-based for loop |a range-based for loop
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/46791] [4.6 Regression] GCC fails on "for(struct { } f;;) ;", incorrectly treating it as a range-based for loop
2010-12-03 20:02 [Bug c++/46791] New: GCC fails on "for(struct { } f;;) ;", incorrectly treating it as a range-based for loop schaub-johannes at web dot de
2010-12-03 22:32 ` [Bug c++/46791] [4.6 Regression] " rguenth at gcc dot gnu.org
@ 2011-01-03 20:33 ` rguenth at gcc dot gnu.org
2011-01-03 21:01 ` hjl.tools at gmail dot com
2011-01-13 0:03 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-03 20:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46791
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/46791] [4.6 Regression] GCC fails on "for(struct { } f;;) ;", incorrectly treating it as a range-based for loop
2010-12-03 20:02 [Bug c++/46791] New: GCC fails on "for(struct { } f;;) ;", incorrectly treating it as a range-based for loop schaub-johannes at web dot de
2010-12-03 22:32 ` [Bug c++/46791] [4.6 Regression] " rguenth at gcc dot gnu.org
2011-01-03 20:33 ` rguenth at gcc dot gnu.org
@ 2011-01-03 21:01 ` hjl.tools at gmail dot com
2011-01-13 0:03 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-03 21:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46791
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2011.01.03 21:01:10
Ever Confirmed|0 |1
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-03 21:01:10 UTC ---
Works for me with revision 168409.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/46791] [4.6 Regression] GCC fails on "for(struct { } f;;) ;", incorrectly treating it as a range-based for loop
2010-12-03 20:02 [Bug c++/46791] New: GCC fails on "for(struct { } f;;) ;", incorrectly treating it as a range-based for loop schaub-johannes at web dot de
` (2 preceding siblings ...)
2011-01-03 21:01 ` hjl.tools at gmail dot com
@ 2011-01-13 0:03 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2011-01-13 0:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46791
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
CC| |jason at gcc dot gnu.org
Resolution| |FIXED
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-01-12 23:54:07 UTC ---
Fixed by the patch from Rodrigo I just checked in.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-12 23:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-03 20:02 [Bug c++/46791] New: GCC fails on "for(struct { } f;;) ;", incorrectly treating it as a range-based for loop schaub-johannes at web dot de
2010-12-03 22:32 ` [Bug c++/46791] [4.6 Regression] " rguenth at gcc dot gnu.org
2011-01-03 20:33 ` rguenth at gcc dot gnu.org
2011-01-03 21:01 ` hjl.tools at gmail dot com
2011-01-13 0:03 ` jason at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).