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]










![The Gang Republic: Inside Haiti’s New Order (2026) - ~3 million people living in the grips of all-out gang war. France24 spent a fortnight filming in and around the Haitian capital, speaking to a population held hostage by this drawn-out crisis (CC) [00:52:38]](https://external-preview.redd.it/0j1B98qWy2MAsjLEwjT10EbknBToMVuWRJ-tUeZsTso.jpeg?width=320&crop=smart&auto=webp&s=041d55dee546ef807e7eda2e0d1d013111f02a25)

English (US) ·