Paul Eggert wrote: > The -Wtautological-constant-out-of-range-compare issue is pretty much > just a bug in Clang, if you ask me. At the very least it's a > questionable feature. To work around the problem, compile with > -Wno-tautological-constant-out-of-range-compare. This is discussed in > the HACKING file.
The -Wtautological-* warnings, that are implied by "-Wall -W" (added by octave.configure.ac line GCC_EXTRA_FLAGS), report when the compiler has done certain specific optimizations. These optimizations are not dangerous; they are just a subset of normal compiler optimizations. It would be silly for Gnulib to change its base64.h file to add #if logic just to make sure that we make this optimization at the preprocessor level without involving the compiler. Just as silly as it would be to write #if FOO != 0 int y = x + FOO; #else int y = x; #endif The compiler is _supposed_ to make these optimizations. And Octave's build system requested a report for each such optimization. You got that report. > The -Wcast-qual false alarms should be easy to fix and arguably make the > code a bit clearer, so I installed the attached (which also fixes some > similar issues in the neighborhood). The only needed -Wcast-qual fix was the one in the .h file. The two ones in .c files are hidden through the GL_CFLAG_GNULIB_WARNINGS variable that Gnulib defines and that gets used in octave/libgnu/Makefile. > Bruno fixed the -Wformat-security false alarms last year; perhaps > something in that didn't catch? See: > > https://lists.gnu.org/archive/html/bug-gnulib/2025-05/msg00266.html Yes, I fixed these warnings the reasonable way, making use of a GCC feature. clang is not on par with GCC on this issue; it's a WONTFIX from our side, but hopefully someone will reach out to the LLVM people eventually. [1] Bruno [1] https://lists.gnu.org/archive/html/bug-gnulib/2026-01/msg00088.html
