From 6f5db0255cab2e17ab53ee68f6dc2f4d75978d80 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 18 May 2016 00:05:53 -0700 Subject: [PATCH] Sync from gnulib This incorporates: 2016-05-17 manywarnings: update for GCC 6.1 2016-05-13 intdiv0, memmem, nocrash, strcasestr, strstr: no exit * m4/manywarnings.m4, m4/nocrash.m4: Copy from gnulib. --- m4/manywarnings.m4 | 14 +++++++++++++- m4/nocrash.m4 | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4 index 12d68da6f38..90823b0acf4 100644 --- a/m4/manywarnings.m4 +++ b/m4/manywarnings.m4 @@ -1,4 +1,4 @@ -# manywarnings.m4 serial 7 +# manywarnings.m4 serial 8 dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -129,6 +129,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], -Wdiscarded-qualifiers \ -Wdiv-by-zero \ -Wdouble-promotion \ + -Wduplicated-cond \ -Wempty-body \ -Wendif-labels \ -Wenum-compare \ @@ -140,7 +141,10 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], -Wformat-signedness \ -Wformat-y2k \ -Wformat-zero-length \ + -Wframe-address \ -Wfree-nonheap-object \ + -Whsa \ + -Wignored-attributes \ -Wignored-qualifiers \ -Wimplicit \ -Wimplicit-function-declaration \ @@ -158,6 +162,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], -Wmain \ -Wmaybe-uninitialized \ -Wmemset-transposed-args \ + -Wmisleading-indentation \ -Wmissing-braces \ -Wmissing-declarations \ -Wmissing-field-initializers \ @@ -168,6 +173,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], -Wnarrowing \ -Wnested-externs \ -Wnonnull \ + -Wnonnull-compare \ + -Wnull-dereference \ -Wodr \ -Wold-style-declaration \ -Wold-style-definition \ @@ -184,10 +191,12 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], -Wpragmas \ -Wreturn-local-addr \ -Wreturn-type \ + -Wscalar-storage-order \ -Wsequence-point \ -Wshadow \ -Wshift-count-negative \ -Wshift-count-overflow \ + -Wshift-negative-value \ -Wsizeof-array-argument \ -Wsizeof-pointer-memaccess \ -Wstack-protector \ @@ -205,6 +214,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], -Wswitch-default \ -Wsync-nand \ -Wsystem-headers \ + -Wtautological-compare \ -Wtrampolines \ -Wtrigraphs \ -Wtype-limits \ @@ -237,6 +247,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], # them here so that the above 'comm' command doesn't report a false match. gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2" gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc" + gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2" + gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2" # These are needed for older GCC versions. if test -n "$GCC"; then diff --git a/m4/nocrash.m4 b/m4/nocrash.m4 index ecc55c6172d..d8dd8f13a12 100644 --- a/m4/nocrash.m4 +++ b/m4/nocrash.m4 @@ -110,11 +110,12 @@ nocrash_init (void) #else /* Avoid a crash on POSIX systems. */ #include +#include /* A POSIX signal handler. */ static void exception_handler (int sig) { - exit (1); + _exit (1); } static void nocrash_init (void) -- 2.39.2