Commit 959c3d24 authored by Paul Eggert's avatar Paul Eggert

Merge from gnulib.

This incorporates:
2013-09-24 manywarnings: enable nicer gcc warning messages
2013-09-23 warnings: port --enable-gcc-warnings to Solaris Studio 12.3
2013-09-21 timespec: use the new TIMESPEC_RESOLUTION elsewhere
* configure.ac (WERROR_CFLAGS): Omit -fdiagnostics-show-option
and -funit-at-a-time, since manywarnings does that for us now.
parent 0c173878
2013-09-25 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
2013-09-24 manywarnings: enable nicer gcc warning messages
2013-09-23 warnings: port --enable-gcc-warnings to Solaris Studio 12.3
2013-09-21 timespec: use the new TIMESPEC_RESOLUTION elsewhere
* configure.ac (WERROR_CFLAGS): Omit -fdiagnostics-show-option
and -funit-at-a-time, since manywarnings does that for us now.
2013-09-23 Jan Djärv <jan.h.d@swipnet.se> 2013-09-23 Jan Djärv <jan.h.d@swipnet.se>
* configure.ac: With clang, check for and use -Wno-switch, * configure.ac: With clang, check for and use -Wno-switch,
......
...@@ -886,9 +886,6 @@ else ...@@ -886,9 +886,6 @@ else
gl_WARN_ADD([-Wno-unused-value]) gl_WARN_ADD([-Wno-unused-value])
fi fi
gl_WARN_ADD([-fdiagnostics-show-option])
gl_WARN_ADD([-funit-at-a-time])
AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
AH_VERBATIM([FORTIFY_SOURCE], AH_VERBATIM([FORTIFY_SOURCE],
[/* Enable compile-time and run-time bounds-checking, and some warnings, [/* Enable compile-time and run-time bounds-checking, and some warnings,
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
/* Written by Paul Eggert. */ /* Written by Paul Eggert. */
/* Return the sum of two timespec values A and B. On overflow, return /* Return the sum of two timespec values A and B. On overflow, return
an extremal value. This assumes 0 <= tv_nsec <= 999999999. */ an extremal value. This assumes 0 <= tv_nsec < TIMESPEC_RESOLUTION. */
#include <config.h> #include <config.h>
#include "timespec.h" #include "timespec.h"
...@@ -58,7 +58,7 @@ timespec_add (struct timespec a, struct timespec b) ...@@ -58,7 +58,7 @@ timespec_add (struct timespec a, struct timespec b)
{ {
high_overflow: high_overflow:
rs = TYPE_MAXIMUM (time_t); rs = TYPE_MAXIMUM (time_t);
rns = 999999999; rns = TIMESPEC_RESOLUTION - 1;
} }
} }
else else
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
/* Written by Paul Eggert. */ /* Written by Paul Eggert. */
/* Return the difference between two timespec values A and B. On /* Return the difference between two timespec values A and B. On
overflow, return an extremal value. This assumes 0 <= tv_nsec <= overflow, return an extremal value. This assumes 0 <= tv_nsec <
999999999. */ TIMESPEC_RESOLUTION. */
#include <config.h> #include <config.h>
#include "timespec.h" #include "timespec.h"
...@@ -58,7 +58,7 @@ timespec_sub (struct timespec a, struct timespec b) ...@@ -58,7 +58,7 @@ timespec_sub (struct timespec a, struct timespec b)
else else
{ {
rs = TYPE_MAXIMUM (time_t); rs = TYPE_MAXIMUM (time_t);
rns = 999999999; rns = TIMESPEC_RESOLUTION - 1;
} }
} }
else else
......
# manywarnings.m4 serial 5 # manywarnings.m4 serial 6
dnl Copyright (C) 2008-2013 Free Software Foundation, Inc. dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
...@@ -204,6 +204,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], ...@@ -204,6 +204,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wvla \ -Wvla \
-Wvolatile-register-var \ -Wvolatile-register-var \
-Wwrite-strings \ -Wwrite-strings \
-fdiagnostics-show-option \
-funit-at-a-time \
\ \
; do ; do
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
......
# warnings.m4 serial 10 # warnings.m4 serial 11
dnl Copyright (C) 2008-2013 Free Software Foundation, Inc. dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
...@@ -36,9 +36,9 @@ AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [ ...@@ -36,9 +36,9 @@ AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
gl_save_compiler_FLAGS="$gl_Flags" gl_save_compiler_FLAGS="$gl_Flags"
gl_AS_VAR_APPEND(m4_defn([gl_Flags]), gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
[" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["]) [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
AC_COMPILE_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])], AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
[AS_VAR_SET(gl_Warn, [yes])], [AS_VAR_SET(gl_Warn, [yes])],
[AS_VAR_SET(gl_Warn, [no])]) [AS_VAR_SET(gl_Warn, [no])])
gl_Flags="$gl_save_compiler_FLAGS" gl_Flags="$gl_save_compiler_FLAGS"
]) ])
AS_VAR_IF(gl_Warn, [yes], [$2], [$3]) AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment