https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91839
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmalcolm at gcc dot gnu.org --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- I can confirm GCC doesn't suggest l_24, but I'm not sure it's reasonable to expect it to do so after so many parse errors. If you fix the first two errors then you do get it: 91839.c:6:10: error: ‘l_2’ undeclared (first use in this function); did you mean ‘l_24’? 6 | return l_2[0]; //error | ^~~ | l_24 Your code is ill-formed. GCC tells you it's ill-formed. I don't see a bug here.