[Bug c++/93699] Invalid operator== (returning non-bool type) candidate
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 17 05:12:03 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93699
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
clang does this as a pedwarn:
<source>:20:12: warning: ISO C++20 requires return type of selected
'operator==' function for rewritten '==' comparison to be 'bool', not 'int'
[-Wrewrite-not-bool]
if (*b == *d) {
~~ ^ ~~
I don't know if it makes sense now to change GCC to do a pedwarn instead of an
error.
More information about the Gcc-bugs
mailing list