bug-gnulib
[Top][All Lists]
Advanced

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

latest gcc vs lib/timespec.h:85


From: Jim Meyering
Subject: latest gcc vs lib/timespec.h:85
Date: Mon, 2 Oct 2017 18:24:09 -0700

Hi Paul,
Mainly just a heads up, since this certainly isn't blocking me.

When trying to build coreutils using gcc built from very recent (with
some change committed since Sep 26), I see this new warning/error:

In file included from src/system.h:140:0,
                 from src/ls.c:84:
src/ls.c: In function 'print_long_format':
./lib/timespec.h:85:11: error: assuming signed overflow does not occur
when simplifying conditional to constant [-Werror=strict-overflow]
   return (a.tv_sec < b.tv_sec ? -1
          ~~~~~~~~~~~~~~~~~~~~~~~~~
           : a.tv_sec > b.tv_sec ? 1
           ^~~~~~~~~~~~~~~~~~~~~~~~~
           : (int) (a.tv_nsec - b.tv_nsec));
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When compiling with gcc built from latest sources on September 26,
there is no such problem.

Given all of the comments on that function, I'd be tempted to suppress
this warning in that function.



reply via email to

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