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

--- Comment #2 from tangyixuan <tangyixuan at mail dot dlut.edu.cn> ---
(In reply to Jakub Jelinek from comment #1)
> This is again diagnostics on uninstantiated template, invalid, no
> diagnostics required.
> Instantiate the template and it will be diagnosed.

Yeah, I agree with you. If we correct the second error (i.e., lab1(1) ->
fun(1)), there is a error diagnostic for the first error as below:
s.cpp:4:36: error: label ‘lab2’ used but not defined
    4 |   static void* labs[2] = { &&lab1, &&lab2 };
      |                                    ^~~~~~

The convenient thing is that if the compiler reports the two programming
mistakes (real errors) at one compilation time could be better, so as to save
the developers' time I guess.

Reply via email to