public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56722] New: C++11: syntax error in for loop ends in SEGV
@ 2013-03-25 17:24 akim.demaille at gmail dot com
  2013-03-25 17:31 ` [Bug c++/56722] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: akim.demaille at gmail dot com @ 2013-03-25 17:24 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56722

             Bug #: 56722
           Summary: C++11: syntax error in for loop ends in SEGV
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: akim.demaille@gmail.com


Probably because of Boost.Foreach, I had a comma instead of a colon to separate
the iteration variable from the range.  GCC did not like that.

$ cat segv.cc
int main()
{
  for (const auto& i, 21)
    i;
}

$ g++-mp-4.8 -Wall -std=c++11 segv.cc
segv.cc: In function 'int main()':
segv.cc:3:20: internal compiler error: Segmentation fault: 11
   for (const auto& i, 21)
                    ^

segv.cc:3:20: internal compiler error: Abort trap: 6
g++-mp-4.8: internal compiler error: Abort trap: 6 (program cc1plus)
zsh: abort      g++-mp-4.8 -Wall -std=c++11 segv.cc

$ g++-mp-4.8 --version
g++-mp-4.8 (MacPorts gcc48 4.8-20130321_0) 4.8.0 20130321 (prerelease)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/56722] C++11: syntax error in for loop ends in SEGV
  2013-03-25 17:24 [Bug c++/56722] New: C++11: syntax error in for loop ends in SEGV akim.demaille at gmail dot com
@ 2013-03-25 17:31 ` redi at gcc dot gnu.org
  2013-03-25 18:23 ` paolo.carlini at oracle dot com
  2013-03-25 20:40 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2013-03-25 17:31 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56722

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-03-25
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/56722] C++11: syntax error in for loop ends in SEGV
  2013-03-25 17:24 [Bug c++/56722] New: C++11: syntax error in for loop ends in SEGV akim.demaille at gmail dot com
  2013-03-25 17:31 ` [Bug c++/56722] " redi at gcc dot gnu.org
@ 2013-03-25 18:23 ` paolo.carlini at oracle dot com
  2013-03-25 20:40 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-25 18:23 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56722

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-03-25 18:22:57 UTC ---
Mine.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/56722] C++11: syntax error in for loop ends in SEGV
  2013-03-25 17:24 [Bug c++/56722] New: C++11: syntax error in for loop ends in SEGV akim.demaille at gmail dot com
  2013-03-25 17:31 ` [Bug c++/56722] " redi at gcc dot gnu.org
  2013-03-25 18:23 ` paolo.carlini at oracle dot com
@ 2013-03-25 20:40 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-25 20:40 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56722

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.8.1

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-03-25 20:40:33 UTC ---
Fixed mainline and 4.8.1.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-25 20:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25 17:24 [Bug c++/56722] New: C++11: syntax error in for loop ends in SEGV akim.demaille at gmail dot com
2013-03-25 17:31 ` [Bug c++/56722] " redi at gcc dot gnu.org
2013-03-25 18:23 ` paolo.carlini at oracle dot com
2013-03-25 20:40 ` paolo.carlini at oracle dot com

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).