hi,
as i was working on my c++ side project, i accidentally stumbled upon a bug in latest gcc.
the following code results in an internal compiler error, when compiling via `g++ main.cc -std=c++23`. (note: clang compiles this just fine)
struct S { int x; void f() { [&](this const auto&) { x; }(); } }; int main() { }is this bug known, or has anyone here seen it before?
if not im going to report it, and maybe even try to fix it myself.
edit: godbolt link https://godbolt.org/z/zE75nKj4E
[link] [comments]




![Halpatiokee Park [Stuart, FL]](https://preview.redd.it/yc2jvtj3cr3h1.jpg?width=140&height=140&crop=1:1,smart&auto=webp&s=b2f1cd5287a887343d041998e03125d29890059e)










English (US) ·