https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101361 --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- It seems acceptable, but isn't the diagnostic bug still there if users write exactly the same code? The use of npos there is valid.