emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r117807: Merge from gnulib, incorporating:


From: Paul Eggert
Subject: [Emacs-diffs] trunk r117807: Merge from gnulib, incorporating:
Date: Tue, 02 Sep 2014 19:17:29 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117807
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2014-09-02 12:17:23 -0700
message:
  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.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  m4/gnulib-common.m4            
gnulibcommon.m4-20110108211121-3ig4un4ogtyyca3s-10
  m4/manywarnings.m4             
manywarnings.m4-20120409074357-zmklh5i58niw7z33-1
=== modified file 'ChangeLog'
--- a/ChangeLog 2014-09-01 09:54:12 +0000
+++ b/ChangeLog 2014-09-02 19:17:23 +0000
@@ -1,3 +1,10 @@
+2014-09-02  Paul Eggert  <address@hidden>
+
+       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.
+
 2014-09-01  Paul Eggert  <address@hidden>
 
        --enable-silent-rules now suppresses more chatter.

=== modified file 'm4/gnulib-common.m4'
--- a/m4/gnulib-common.m4       2014-06-17 16:09:19 +0000
+++ b/m4/gnulib-common.m4       2014-09-02 19:17:23 +0000
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 35
+# gnulib-common.m4 serial 36
 dnl Copyright (C) 2007-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -319,26 +319,28 @@
 ])
 
 # AC_C_RESTRICT
-# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
-# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
-# works.
-# This definition can be removed once autoconf >= 2.62 can be assumed.
-# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
-m4_ifndef([AC_AUTOCONF_VERSION],[
+# This definition is copied from post-2.69 Autoconf and overrides the
+# AC_C_RESTRICT macro from autoconf 2.60..2.69.  It can be removed
+# once autoconf >= 2.70 can be assumed.  It's painful to check version
+# numbers, and in practice this macro is more up-to-date than Autoconf
+# is, so override Autoconf unconditionally.
 AC_DEFUN([AC_C_RESTRICT],
 [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
   [ac_cv_c_restrict=no
    # The order here caters to the fact that C++ does not require restrict.
    for ac_kw in __restrict __restrict__ _Restrict restrict; do
-     AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-      [[typedef int * int_ptr;
-        int foo (int_ptr $ac_kw ip) {
-        return ip[0];
-       }]],
-      [[int s[1];
-        int * $ac_kw t = s;
-        t[0] = 0;
-        return foo(t)]])],
+     AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM(
+        [[typedef int *int_ptr;
+          int foo (int_ptr $ac_kw ip) { return ip[0]; }
+          int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
+          int bar (int ip[$ac_kw]) { return ip[0]; }
+        ]],
+        [[int s[1];
+          int *$ac_kw t = s;
+          t[0] = 0;
+          return foo (t) + bar (t);
+        ]])],
       [ac_cv_c_restrict=$ac_kw])
      test "$ac_cv_c_restrict" != no && break
    done
@@ -348,21 +350,21 @@
    nothing if this is not supported.  Do not define if restrict is
    supported directly.  */
 #undef restrict
-/* Work around a bug in Sun C++: it does not support _Restrict, even
-   though the corresponding Sun C compiler does, which causes
-   "#define restrict _Restrict" in the previous line.  Perhaps some future
-   version of Sun C++ will work with _Restrict; if so, it'll probably
-   define __RESTRICT, just as Sun C does.  */
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
 #if defined __SUNPRO_CC && !defined __RESTRICT
 # define _Restrict
+# define __restrict__
 #endif])
  case $ac_cv_c_restrict in
    restrict) ;;
    no) AC_DEFINE([restrict], []) ;;
    *)  AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
  esac
-])
-])
+])# AC_C_RESTRICT
 
 # gl_BIGENDIAN
 # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.

=== modified file 'm4/manywarnings.m4'
--- a/m4/manywarnings.m4        2014-01-03 01:59:58 +0000
+++ b/m4/manywarnings.m4        2014-09-02 19:17:23 +0000
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 6
+# manywarnings.m4 serial 7
 dnl Copyright (C) 2008-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -93,6 +93,14 @@
   fi
 
   # List all gcc warning categories.
+  # To compare this list to your installed GCC's, run this Bash command:
+  #
+  # comm -3 \
+  #  <(sed -n 's/^  *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
+  #  <(gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort |
+  #      grep -v -x -f <(
+  #         awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec))
+
   gl_manywarn_set=
   for gl_manywarn_item in \
     -W \
@@ -111,6 +119,7 @@
     -Wcomments \
     -Wcoverage-mismatch \
     -Wcpp \
+    -Wdate-time \
     -Wdeprecated \
     -Wdeprecated-declarations \
     -Wdisabled-optimization \
@@ -150,9 +159,9 @@
     -Wnarrowing \
     -Wnested-externs \
     -Wnonnull \
-    -Wnormalized=nfc \
     -Wold-style-declaration \
     -Wold-style-definition \
+    -Wopenmp-simd \
     -Woverflow \
     -Woverlength-strings \
     -Woverride-init \
@@ -203,13 +212,26 @@
     -Wvla \
     -Wvolatile-register-var \
     -Wwrite-strings \
-    -fdiagnostics-show-option \
-    -funit-at-a-time \
     \
     ; do
     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
   done
 
+  # gcc --help=warnings outputs an unusual form for this option; list
+  # it here so that the above 'comm' command doesn't report a false match.
+  gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
+
+  # These are needed for older GCC versions.
+  if test -n "$GCC"; then
+    case `($CC --version) 2>/dev/null` in
+      'gcc (GCC) '[[0-3]].* | \
+      'gcc (GCC) '4.[[0-7]].*)
+        gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
+        gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
+          ;;
+    esac
+  fi
+
   # Disable specific options as needed.
   if test "$gl_cv_cc_nomfi_needed" = yes; then
     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"


reply via email to

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