[Bug c++/86186] Unqualified calls of std::get lead to ADL issues
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jun 23 00:31:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86186
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to zhonghao from comment #2)
> (In reply to Jonathan Wakely from comment #1)
> > (In reply to zhonghao from comment #0)
> > > A previous version of clang++ does not produce any error messages for the
> > > above code, but it was fixed in https://bugs.llvm.org/show_bug.cgi?id=20092
> >
> > No, you've completely misunderstood the llvm bug report.
>
> Never the less, g++ accepts the code, but clang++ rejects it, right?
No, clang accepts it. Do you understand any of the bugs you're reporting? You
seem to be blindly copying code between bugzillas and making totally incorrect
claims about what the other compiler does.
> My g++ is 8.0.1 20180413, my clang++ is 7.0.0 (trunk 329990).
>
> The warning message of clang++ is as follow:
> 17:5: warning: equality comparison result unused
> [-Wunused-comparison]
> t1 == t2; // error: static_assert failed ""
> ~~~^~~~~
> code2.c.cpp:17:5: note: use '=' to turn this equality comparison into an
> assignment
> t1 == t2; // error: static_assert failed ""
> ^~
> =
> 1 warning generated.
>
> The message sounds reasonable, but g++ does not produce any warning
> messages. Shall g++ make the improvement?
We already have an enhancement request to add something like clang's
-Wunused-comparison, see PR 53598
More information about the Gcc-bugs
mailing list