|
From: | Paul Eggert |
Subject: | Re: latest gcc vs lib/timespec.h:85 |
Date: | Mon, 2 Oct 2017 18:31:37 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/02/2017 06:24 PM, Jim Meyering wrote:
Given all of the comments on that function, I'd be tempted to suppress this warning in that function.
That would work. Another possibility would be to include verify.h and add something like this to the start of timespec_cmp:
assume (-1 <= a.tv_nsec && a.tv_nsec <= 2 * TIMESPEC_RESOLUTION); assume (-1 <= b.tv_nsec && b.tv_nsec <= 2 * TIMESPEC_RESOLUTION);We might be able to make these 'assume' calls fancier, to exactly match the comments, but I'm not sure it's worth the bother.
[Prev in Thread] | Current Thread | [Next in Thread] |