From a650af7aa2c66f9086d10eba822d0b2c8fe23dc5 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Sat, 6 Jul 2019 19:55:37 +0000 Subject: [acinclude.m4] Added missing "const" qualifier to "char *" in a test; needed with GCC's "-Wwrite-strings -Werror". git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13519 280ebfd0-de03-0410-8827-d642c229c3f4 --- acinclude.m4 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 064707a93..86e9db48b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -413,12 +413,14 @@ if test "$mpfr_cv_nanisnan" = "yes"; then AC_MSG_WARN([platform and/or document the behavior.]) fi -dnl Check if the chars '0' to '9' are consecutive values +dnl Check if the chars '0' to '9', 'a' to 'z', and 'A' to 'Z' are +dnl consecutive values. +dnl The const is necessary with GCC's "-Wwrite-strings -Werror". AC_MSG_CHECKING([if charset has consecutive values]) AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -char *number = "0123456789"; -char *lower = "abcdefghijklmnopqrstuvwxyz"; -char *upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +const char *number = "0123456789"; +const char *lower = "abcdefghijklmnopqrstuvwxyz"; +const char *upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; ]],[[ int i; unsigned char *p; -- cgit v1.2.1