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

--- Comment #6 from k4lizen at proton dot me ---
I understand what you're saying but I'm hoping that there would be *some*
solution for annotating such functions as noreturn. It's highly
counterintuitive that even after marking all definitions and declarations of a
function as noreturn, and even calling it from a class that defines it (the
compiler should theoretically be able to deterministically determine the
definition used, and see that it's annotated as noreturn, no?) doesn't work.

If this ends up being closed as 'working as intended', perhaps there should at
least be a warning emmited for annotating pure virtuals as noreturn.

On the other hand, for anyone else stumbling upon this, fully qualifying the
overriding function gets rid of the warning. So for the example from #117337 :
======
int B::returnsathing() {
   B::will_throw();
}
======
doesn't emit a warning.

Reply via email to