From: Bruno Haible Date: Thu, 24 Apr 2025 18:02:12 +0000 (+0200) Subject: getlocalename_l-unsafe: Disable unwanted compiler optimization. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=e5233af807d7172c8418a461769928dbd92a64c2;p=gnulib.git getlocalename_l-unsafe: Disable unwanted compiler optimization. * lib/getlocalename_l-unsafe.c (_GL_ARG_NONNULL): Define to empty. --- 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. */