https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82170

Paul Eggert <eggert at gnu dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|7.1.1                       |8.3.1

--- Comment #10 from Paul Eggert <eggert at gnu dot org> ---
I just now ran into this problem in another situation and so was reminded of
this bug report.

For what it's worth, clang does a good job of optimizing these comparisons. I
just now compiled the sample C source code attached to this bug report, and
clang version 7.0.1 (Fedora 7.0.1-4.fc29) x86-64 generates the same code for
checked_arg_portable that it does for checked_arg_GCC7, whereas GCC 8.3.1
20190223 (Red Hat 8.3.1-2) x86-64 still generates poorly-optimized code for
checked_arg_portable.

Reply via email to