[Bug libstdc++/93479] compare_three_way allows comparing arrays

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 29 13:47:00 GMT 2020


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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:83b0201035cfdc1d4d80153f4e19ec98cf059941

commit r10-6324-g83b0201035cfdc1d4d80153f4e19ec98cf059941
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Jan 29 13:36:15 2020 +0000

    libstdc++: Make std::compare_three_way check if <=> is valid (PR 93479)

    Currently types that cannot be compared using <=> but which are
    convertible to pointers will be compared by converting to pointers
    first. They should not be comparable.

        PR libstdc++/93479
        * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
        * testsuite/18_support/comparisons/object/93479.cc: New test.


More information about the Gcc-bugs mailing list