[Bug middle-end/105849] A couple of new clang warnings

2022-06-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105849 --- Comment #2 from Jonathan Wakely --- N.B. the finalize> function is correct. The Clang warning is saying "this class is not final, so the dynamic type might be different from the static type" (in which case we would have UB) but that is not a

[Bug middle-end/105849] A couple of new clang warnings

2022-06-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105849 --- Comment #1 from Jonathan Wakely --- (In reply to David Binderman from comment #0) > Standard practice is to have virtual destructor in the presence of virtual > functions. Or a protected destructor, or to make the class final. int_range ca