http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57489

--- Comment #8 from Jim Hand <jhand at austin dot rr.com> ---
Do you not agree that the compiler is not handling this situation in a very
helpful manner? A warning at minimal would be helpful, but when there is code
that equivalently says the following and prints identical values for the
expected and actual, it makes it pretty hard for a sane developer to debug:

  if (expected_v != actual_v)
      printf("%lld %lld", expected_v, actual_v);

additionally, there are other very slight changes that can be made to the
program that change the behavior wildly, such as make the function a
non-templated class or changing the conditional to only have what is printed
above.

You can close this case as invalid, but I think you may be doing gcc a
disservice because this is an opportunity for quality improvement.

Reply via email to