https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123031 --- Comment #1 from Andreas F. Borchert <gccbugs@andreas-borchert.de> --- I've tested two other versions of GCC: * g++ 15.1.0 delivers the same warning (under Solaris 11.4) * g++ 13.3.0 delivers no warning (under Linux and Solaris 11.4)