bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C compatibility issue in the configure script


From: Florian Weimer
Subject: C compatibility issue in the configure script
Date: Mon, 20 Nov 2023 13:54:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

In standard C, char * amd char ** are different types, and the strtold
call is only valid if the latter is used for its second argument.

We are still considering whether GCC 14 will treat these type safety
violations as errors by default, but it's a possibility.

Thanks,
Florian

diff --git a/configure.ac b/configure.ac
index 6defea0835fe8877..955c1149a8141e19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -885,7 +885,7 @@ AC_CHECK_DECLS([strtold], [
        [AC_COMPILE_IFELSE(
                [AC_LANG_PROGRAM(
                [[#include <stdlib.h>]],
-               [[long double r; char *foo, bar; r = strtold(foo, &bar);]]
+               [[long double r; char *foo, *bar; r = strtold(foo, &bar);]]
        )],
        [bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes])
         ]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]