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++/72775] [6/7 Regression] internal compiler error: in finish_expr_stmt, at cp/semantics.c:677


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72775

--- Comment #12 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Matteo Bertello from comment #10)
> Just had the same internal compiler error on a different piece of code,
> using GCC 6.1.1 on Fedora 24.
> Might be useful to investigate the cause.

This code doesn't compile for me at all:

r3.cc: In function ‘int main(int, char**)’:
r3.cc:8:27: error: expected primary-expression before ‘(’ token
  auto thread = std::thread([&, =val]() { func(val); });
                           ^
r3.cc:8:32: error: expected identifier before ‘=’ token
  auto thread = std::thread([&, =val]() { func(val); });
                                ^

clang++ rejects it, too.

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