On Tue, 14 Jun 2016, Jakub Jelinek wrote: > But, unlike normal signed or unsigned integral types or char, cast to > bool/_Bool is special, it is actually a comparison != 0. > So, I'd say if we want to support arith overflow to bool/_Bool, it should be > above with: > signed_intNNN_t t = (signed_intNNN_t) x + (signed_intNNN_t) y; > z = t != 0; > ovf = (signed_intNNN_t) z != t;
And, I really don't see this as useful. Rejecting boolean types there makes more sense to me. -- Joseph S. Myers jos...@codesourcery.com