From 8ffb4f400d9e40f16757d39b3acf595ff7a46875 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 27 Apr 2025 23:49:12 -0700 Subject: [PATCH] manywarnings: omit -Wdisabled-optimization * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove -Wdisabled-optimization, as this is a warning about the compiler not the program. I discovered the need for this when compiling bleeding-edge Emacs with gcc-15 (Ubuntu 15-20250404-0ubuntu1) 15.0.1 20250404 (experimental) [master r15-9193-g08e803aa9be] on x86-64. Also, omit a no-longer-necessary LC_ALL=C in a comment. --- ChangeLog | 9 +++++++++ HACKING | 2 -- build-aux/gcc-warning.spec | 1 + m4/manywarnings.m4 | 3 +-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98ffe323cc..84c5fecf1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2025-04-27 Paul Eggert + manywarnings: omit -Wdisabled-optimization + * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): + Remove -Wdisabled-optimization, as this is a warning about the + compiler not the program. I discovered the need for this when + compiling bleeding-edge Emacs with gcc-15 (Ubuntu + 15-20250404-0ubuntu1) 15.0.1 20250404 (experimental) [master + r15-9193-g08e803aa9be] on x86-64. Also, omit a + no-longer-necessary LC_ALL=C in a comment. + gendocs: do not depend on awk * build-aux/gendocs.sh (calcsize): Use shell directly, rather than depending on awk. Allow spaces in outdir. Simplify. diff --git a/HACKING b/HACKING index 6503c27b4c..e0f54a4ccf 100644 --- a/HACKING +++ b/HACKING @@ -192,7 +192,6 @@ there are three possible approaches: -Warith-conversion -Wcast-align=strict -Wdate-time - -Wdisabled-optimization -Wduplicated-cond -Wextra -Wformat-signedness @@ -274,7 +273,6 @@ there are three possible approaches: -Warith-conversion -Wcast-align=strict -Wdate-time - -Wdisabled-optimization -Wduplicated-cond -Wextra -Wformat-signedness diff --git a/build-aux/gcc-warning.spec b/build-aux/gcc-warning.spec index 7d1397136f..e147f49149 100644 --- a/build-aux/gcc-warning.spec +++ b/build-aux/gcc-warning.spec @@ -159,6 +159,7 @@ -Wdeprecated-non-prototype c compatibility -Wdeprecated-variadic-comma-omission c++ and objc+++ compatibility -Wdesignated-init default +-Wdisabled-optimization warns about compiler not about program -Wdiscarded-array-qualifiers default -Wdiscarded-qualifiers default -Wdo-subscript fortran diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4 index cf3f730b4c..eebba90180 100644 --- a/m4/manywarnings.m4 +++ b/m4/manywarnings.m4 @@ -97,7 +97,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)], # export LC_ALL=C && comm -3 \ # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \ # awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \ - # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort) + # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort) $1= for gl_manywarn_item in -fanalyzer -fstrict-flex-arrays \ @@ -106,7 +106,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)], -Wbad-function-cast \ -Wcast-align=strict \ -Wdate-time \ - -Wdisabled-optimization \ -Wdouble-promotion \ -Wduplicated-branches \ -Wduplicated-cond \ -- 2.39.5