From e5233af807d7172c8418a461769928dbd92a64c2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 24 Apr 2025 20:02:12 +0200 Subject: [PATCH] getlocalename_l-unsafe: Disable unwanted compiler optimization. * lib/getlocalename_l-unsafe.c (_GL_ARG_NONNULL): Define to empty. --- ChangeLog | 5 +++++ lib/getlocalename_l-unsafe.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 26d9817c59..018e9f8e6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2025-04-24 Bruno Haible + + getlocalename_l-unsafe: Disable unwanted compiler optimization. + * lib/getlocalename_l-unsafe.c (_GL_ARG_NONNULL): Define to empty. + 2025-04-23 Collin Funk tsearch tests: Disable tfind signature check on Cygwin. diff --git a/lib/getlocalename_l-unsafe.c b/lib/getlocalename_l-unsafe.c index 6a72c81192..cb7ae5e5ea 100644 --- a/lib/getlocalename_l-unsafe.c +++ b/lib/getlocalename_l-unsafe.c @@ -14,6 +14,10 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ +/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc + optimizes away the locale == NULL tests below. */ +#define _GL_ARG_NONNULL(params) + #include /* Specification. */ -- 2.39.5