[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 22 15:53:00 GMT 2016


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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #6)
> I see the problem: It's -Wall that suppresses the error.

Yeah, seems with -Wall ctx->quiet is true (probably desirable, for some kind of
warning we don't want to warn multiple times), but likely we then cache the
results in a hash table.
So we either need to cache also the ctx->quiet flag along with the from and to
trees and only use cache if either ctx->quiet or if the cached quiet value
matches the remembered value, or not cache ctx->quiet lookups (bad), or cache
the warnings/errors we need to emit along with the cached values.


More information about the Gcc-bugs mailing list