mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
configure: add -Werror=array-bounds to CFLAGS when available
This would have prevented https://bugs.gnu.org/76907 * configure.ac: add -Werror=array-bounds to CFLAGS when available
This commit is contained in:
parent
4af6331a65
commit
aeb89f6ad6
2 changed files with 13 additions and 0 deletions
5
NEWS
5
NEWS
|
@ -47,6 +47,11 @@ every line in a file.
|
|||
|
||||
* Changes to the distribution
|
||||
|
||||
* Build system changes
|
||||
|
||||
** -Werror=array-bounds is now added to CFLAGS when available
|
||||
This catches <https://bugs.gnu.org/76907>
|
||||
|
||||
* Bug fixes
|
||||
|
||||
** `basename` now checks the suffix against the base name, not the full path
|
||||
|
|
|
@ -62,6 +62,14 @@ AC_PROG_INSTALL
|
|||
AC_PROG_CC
|
||||
gl_EARLY
|
||||
|
||||
AC_MSG_CHECKING([whether the compiler supports -Werror=array-bounds])
|
||||
old_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror=array-bounds"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo;], [])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
CFLAGS="$old_CFLAGS"])
|
||||
|
||||
AC_MSG_CHECKING([whether the compiler supports -fexcess-precision=standard])
|
||||
old_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fexcess-precision=standard"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue