What GCC version are you using? If it's not GCC 14, try upgrading. I'm using gcc-14 (Ubuntu 14-20240412-0ubuntu1) 14.0.1 20240412 (experimental) [master r14-9935-g67e1433a94f].
I'm not seeing that false alarm when building coreutils v9.5 on Ubuntu
24.04 LTS with "./configure --enable-gcc-warnings CC=gcc-14".
- bug#72842: Compile error d... Tobias Powalowski via GNU coreutils Bug Reports
- bug#72842: Compile er... Paul Eggert
- bug#72842: Compil... Tobias Powalowski via GNU coreutils Bug Reports
- bug#72842: Compil... Pádraig Brady