On 8/8/19 10:50 AM, Marek Polacek wrote:
This PR complains about bogus -Wsign-conversion warning even with an
explicit cast, which the documentation says should suppress the warning.
Pretty similar to c++/86190 which I fixed here
<https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00115.html>.
The problem only happens when using a typedef, because in cp_build_binary_op
we're comparing the types using ==, which I think only works for canonical
types. So use same_type_p to avoid this problem.
Bootstrapped/regtested on x86_64-linux, ok for trunk? I think it makes sense
to fix in in 9.3 too.
OK for both.
Jason