]> git.ipfire.org Git - thirdparty/ccache.git/commit
fix: Work around problem with GCC in util::ends_with
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 6 Jun 2022 18:46:09 +0000 (20:46 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 6 Jun 2022 19:36:39 +0000 (21:36 +0200)
commitc54607fe776c8627659091c4eabd5c8bb8adacfd
treeb4cdb684f37723784b8581fe3f14ef262650a6e4
parent8c2da59c3ed363d606049dd516ce3f02bc325d53
fix: Work around problem with GCC in util::ends_with

The util::ends_with implementation is taken directly from the
implementation suggestion in the C++20 standard, but it produces a
stringop-overread warning with GCC 11.2. There's either some subtle
aspect to this that I don't understand or a compiler bug, but let's work
around it by tweaking the implementation.

Closes #1082.
src/util/string.hpp