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]

[Bug c++/49867] New: [C++0x] ICE on lambda inside switch with case labels in the lambda


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

           Summary: [C++0x] ICE on lambda inside switch with case labels
                    in the lambda
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: jason@gcc.gnu.org


#include <functional>

int
main ()
{
  std::function<void (void)> l;
  switch (3)
  {
    l = [](){ case 3: break; };
  }
}

ICEs during gimplification, my guess is that this is invalid code and should be
rejected by the frontend already, complain that the case 3 is used outside of
switch.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]