]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Remove redundant overflow check for futex timeout [PR 93456]
authorJonathan Wakely <jwakely@redhat.com>
Fri, 13 Nov 2020 19:11:02 +0000 (19:11 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 16 Nov 2020 21:13:52 +0000 (21:13 +0000)
commit730e1357dfb9aff481d6c47a21ef748f0d810d4f
tree7e84eb42e683cae8c19c040a975d5fd3cf8a8416
parente7ca3a43842129084426faba865503ee7d42ce48
libstdc++: Remove redundant overflow check for futex timeout [PR 93456]

The relative_timespec function already checks for the case where the
specified timeout is in the past, so the difference can never be
negative. That means we dn't need to check if it's more negative than
the minimum time_t value.

libstdc++-v3/ChangeLog:

PR libstdc++/93456
* src/c++11/futex.cc (relative_timespec): Remove redundant check
negative values.
* testsuite/30_threads/future/members/93456.cc: New.

(cherry picked from commit b8d36dcc917e8a06d8c20b9f5ecc920ed2b9e947)
libstdc++-v3/src/c++11/futex.cc
libstdc++-v3/testsuite/30_threads/future/members/93456.cc [new file with mode: 0644]