https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114374
--- Comment #3 from Torsten Mandel <torsten.mandel at sap dot com> --- Sorry, actually it also triggers for values below LONG_MAX on gcc-12 & gcc-13 so it also works without UB which should not be the case.