diff options
| author | Paul Eggert | 2014-09-02 12:17:23 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-09-02 12:17:23 -0700 |
| commit | da25527e976176228c44f3c44499e0b402baad65 (patch) | |
| tree | 993fa7de6e9df34644d8d32beae4530400bd4491 | |
| parent | ff8b9b273f8c24c37c11811a7bbb79b54449c0bd (diff) | |
| download | emacs-da25527e976176228c44f3c44499e0b402baad65.tar.gz emacs-da25527e976176228c44f3c44499e0b402baad65.zip | |
Merge from gnulib, incorporating:
2014-09-02 gnulib-common.m4: port to GCC 4.2.1 and Sun Studio 12 C++
2014-09-01 manywarnings: add GCC 4.9 warnings
* m4/gnulib-common.m4, m4/manywarnings.m4: Update from gnulib.
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | m4/gnulib-common.m4 | 48 | ||||
| -rw-r--r-- | m4/manywarnings.m4 | 30 |
3 files changed, 58 insertions, 27 deletions
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-09-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Merge from gnulib, incorporating: | ||
| 4 | 2014-09-02 gnulib-common.m4: port to GCC 4.2.1 and Sun Studio 12 C++ | ||
| 5 | 2014-09-01 manywarnings: add GCC 4.9 warnings | ||
| 6 | * m4/gnulib-common.m4, m4/manywarnings.m4: Update from gnulib. | ||
| 7 | |||
| 1 | 2014-09-01 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2014-09-01 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 9 | ||
| 3 | --enable-silent-rules now suppresses more chatter. | 10 | --enable-silent-rules now suppresses more chatter. |
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 35f6195204e..31e5f9499e0 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # gnulib-common.m4 serial 35 | 1 | # gnulib-common.m4 serial 36 |
| 2 | dnl Copyright (C) 2007-2014 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2014 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -319,26 +319,28 @@ m4_ifdef([AC_PROG_MKDIR_P], [ | |||
| 319 | ]) | 319 | ]) |
| 320 | 320 | ||
| 321 | # AC_C_RESTRICT | 321 | # AC_C_RESTRICT |
| 322 | # This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, | 322 | # This definition is copied from post-2.69 Autoconf and overrides the |
| 323 | # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ | 323 | # AC_C_RESTRICT macro from autoconf 2.60..2.69. It can be removed |
| 324 | # works. | 324 | # once autoconf >= 2.70 can be assumed. It's painful to check version |
| 325 | # This definition can be removed once autoconf >= 2.62 can be assumed. | 325 | # numbers, and in practice this macro is more up-to-date than Autoconf |
| 326 | # AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness. | 326 | # is, so override Autoconf unconditionally. |
| 327 | m4_ifndef([AC_AUTOCONF_VERSION],[ | ||
| 328 | AC_DEFUN([AC_C_RESTRICT], | 327 | AC_DEFUN([AC_C_RESTRICT], |
| 329 | [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], | 328 | [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], |
| 330 | [ac_cv_c_restrict=no | 329 | [ac_cv_c_restrict=no |
| 331 | # The order here caters to the fact that C++ does not require restrict. | 330 | # The order here caters to the fact that C++ does not require restrict. |
| 332 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | 331 | for ac_kw in __restrict __restrict__ _Restrict restrict; do |
| 333 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | 332 | AC_COMPILE_IFELSE( |
| 334 | [[typedef int * int_ptr; | 333 | [AC_LANG_PROGRAM( |
| 335 | int foo (int_ptr $ac_kw ip) { | 334 | [[typedef int *int_ptr; |
| 336 | return ip[0]; | 335 | int foo (int_ptr $ac_kw ip) { return ip[0]; } |
| 337 | }]], | 336 | int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ |
| 338 | [[int s[1]; | 337 | int bar (int ip[$ac_kw]) { return ip[0]; } |
| 339 | int * $ac_kw t = s; | 338 | ]], |
| 340 | t[0] = 0; | 339 | [[int s[1]; |
| 341 | return foo(t)]])], | 340 | int *$ac_kw t = s; |
| 341 | t[0] = 0; | ||
| 342 | return foo (t) + bar (t); | ||
| 343 | ]])], | ||
| 342 | [ac_cv_c_restrict=$ac_kw]) | 344 | [ac_cv_c_restrict=$ac_kw]) |
| 343 | test "$ac_cv_c_restrict" != no && break | 345 | test "$ac_cv_c_restrict" != no && break |
| 344 | done | 346 | done |
| @@ -348,21 +350,21 @@ AC_DEFUN([AC_C_RESTRICT], | |||
| 348 | nothing if this is not supported. Do not define if restrict is | 350 | nothing if this is not supported. Do not define if restrict is |
| 349 | supported directly. */ | 351 | supported directly. */ |
| 350 | #undef restrict | 352 | #undef restrict |
| 351 | /* Work around a bug in Sun C++: it does not support _Restrict, even | 353 | /* Work around a bug in Sun C++: it does not support _Restrict or |
| 352 | though the corresponding Sun C compiler does, which causes | 354 | __restrict__, even though the corresponding Sun C compiler ends up with |
| 353 | "#define restrict _Restrict" in the previous line. Perhaps some future | 355 | "#define restrict _Restrict" or "#define restrict __restrict__" in the |
| 354 | version of Sun C++ will work with _Restrict; if so, it'll probably | 356 | previous line. Perhaps some future version of Sun C++ will work with |
| 355 | define __RESTRICT, just as Sun C does. */ | 357 | restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ |
| 356 | #if defined __SUNPRO_CC && !defined __RESTRICT | 358 | #if defined __SUNPRO_CC && !defined __RESTRICT |
| 357 | # define _Restrict | 359 | # define _Restrict |
| 360 | # define __restrict__ | ||
| 358 | #endif]) | 361 | #endif]) |
| 359 | case $ac_cv_c_restrict in | 362 | case $ac_cv_c_restrict in |
| 360 | restrict) ;; | 363 | restrict) ;; |
| 361 | no) AC_DEFINE([restrict], []) ;; | 364 | no) AC_DEFINE([restrict], []) ;; |
| 362 | *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; | 365 | *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; |
| 363 | esac | 366 | esac |
| 364 | ]) | 367 | ])# AC_C_RESTRICT |
| 365 | ]) | ||
| 366 | 368 | ||
| 367 | # gl_BIGENDIAN | 369 | # gl_BIGENDIAN |
| 368 | # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. | 370 | # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. |
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4 index e1cee6cf9d1..3e6dd215ced 100644 --- a/m4/manywarnings.m4 +++ b/m4/manywarnings.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # manywarnings.m4 serial 6 | 1 | # manywarnings.m4 serial 7 |
| 2 | dnl Copyright (C) 2008-2014 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2008-2014 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -93,6 +93,14 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], | |||
| 93 | fi | 93 | fi |
| 94 | 94 | ||
| 95 | # List all gcc warning categories. | 95 | # List all gcc warning categories. |
| 96 | # To compare this list to your installed GCC's, run this Bash command: | ||
| 97 | # | ||
| 98 | # comm -3 \ | ||
| 99 | # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \ | ||
| 100 | # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort | | ||
| 101 | # grep -v -x -f <( | ||
| 102 | # awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec)) | ||
| 103 | |||
| 96 | gl_manywarn_set= | 104 | gl_manywarn_set= |
| 97 | for gl_manywarn_item in \ | 105 | for gl_manywarn_item in \ |
| 98 | -W \ | 106 | -W \ |
| @@ -111,6 +119,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], | |||
| 111 | -Wcomments \ | 119 | -Wcomments \ |
| 112 | -Wcoverage-mismatch \ | 120 | -Wcoverage-mismatch \ |
| 113 | -Wcpp \ | 121 | -Wcpp \ |
| 122 | -Wdate-time \ | ||
| 114 | -Wdeprecated \ | 123 | -Wdeprecated \ |
| 115 | -Wdeprecated-declarations \ | 124 | -Wdeprecated-declarations \ |
| 116 | -Wdisabled-optimization \ | 125 | -Wdisabled-optimization \ |
| @@ -150,9 +159,9 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], | |||
| 150 | -Wnarrowing \ | 159 | -Wnarrowing \ |
| 151 | -Wnested-externs \ | 160 | -Wnested-externs \ |
| 152 | -Wnonnull \ | 161 | -Wnonnull \ |
| 153 | -Wnormalized=nfc \ | ||
| 154 | -Wold-style-declaration \ | 162 | -Wold-style-declaration \ |
| 155 | -Wold-style-definition \ | 163 | -Wold-style-definition \ |
| 164 | -Wopenmp-simd \ | ||
| 156 | -Woverflow \ | 165 | -Woverflow \ |
| 157 | -Woverlength-strings \ | 166 | -Woverlength-strings \ |
| 158 | -Woverride-init \ | 167 | -Woverride-init \ |
| @@ -203,13 +212,26 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], | |||
| 203 | -Wvla \ | 212 | -Wvla \ |
| 204 | -Wvolatile-register-var \ | 213 | -Wvolatile-register-var \ |
| 205 | -Wwrite-strings \ | 214 | -Wwrite-strings \ |
| 206 | -fdiagnostics-show-option \ | ||
| 207 | -funit-at-a-time \ | ||
| 208 | \ | 215 | \ |
| 209 | ; do | 216 | ; do |
| 210 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | 217 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" |
| 211 | done | 218 | done |
| 212 | 219 | ||
| 220 | # gcc --help=warnings outputs an unusual form for this option; list | ||
| 221 | # it here so that the above 'comm' command doesn't report a false match. | ||
| 222 | gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc" | ||
| 223 | |||
| 224 | # These are needed for older GCC versions. | ||
| 225 | if test -n "$GCC"; then | ||
| 226 | case `($CC --version) 2>/dev/null` in | ||
| 227 | 'gcc (GCC) '[[0-3]].* | \ | ||
| 228 | 'gcc (GCC) '4.[[0-7]].*) | ||
| 229 | gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option" | ||
| 230 | gl_manywarn_set="$gl_manywarn_set -funit-at-a-time" | ||
| 231 | ;; | ||
| 232 | esac | ||
| 233 | fi | ||
| 234 | |||
| 213 | # Disable specific options as needed. | 235 | # Disable specific options as needed. |
| 214 | if test "$gl_cv_cc_nomfi_needed" = yes; then | 236 | if test "$gl_cv_cc_nomfi_needed" = yes; then |
| 215 | gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" | 237 | gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" |