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

Momchil Velikov <momchil.velikov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |momchil.velikov at gmail dot 
com

--- Comment #1 from Momchil Velikov <momchil.velikov at gmail dot com> ---
Just stumbled upon essentially the same problem with

c++ (GCC) 4.10.0 20140412 (experimental) [master revision
094da06:e25c6c8:855372a3d3c40b76fed8ff368d37b77d14a488eb]

#include <iostream>

struct S {
  void foo() const;
  void bar();
  int x = 0;
};

void S::foo() const {
  auto f = [&]() { bar(); };
  f();
  std::cout << x << std::endl;
}

void S::bar() { ++x; }

int main() {
  S s;
  s.foo();
  return 0;
}

Reply via email to