https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121553
Bug ID: 121553 Summary: [16 regression] Dolphin fails to build (error: declaration of ‘auto job’ shadows a parameter) Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Dolphin fails to build with some recent trunk changes: ``` /var/tmp/portage/kde-apps/dolphin-25.08.49.9999/work/dolphin-25.08.49.9999/src/dolphinmainwindow.cpp: In lambda function: /var/tmp/portage/kde-apps/dolphin-25.08.49.9999/work/dolphin-25.08.49.9999/src/dolphinmainwindow.cpp:1409:18: error: declaration of ‘auto job’ shadows a parameter 1409 | auto job = new KTerminalLauncherJob(QString()); | ^~~ /var/tmp/portage/kde-apps/dolphin-25.08.49.9999/work/dolphin-25.08.49.9999/src/dolphinmainwindow.cpp:1403:49: note: ‘KIO::StatJob* const job’ previously declared here 1403 | connect(job, &KJob::result, this, [job]() { | ^ ``` With some help from amonakov and reference to https://github.com/cplusplus/draft/issues/6536, it looks like this is accepted by Clang but rejected by GCC: ``` void foo () { int i; auto f = [i] () { int i; return 0; }; } ``` I guess it's r16-3195-gd2dccd1bf79b86?