On Tue, Jun 14, 2016 at 02:05:12PM +0000, Joseph Myers wrote: > 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.
I also don't think supporting booleans is worth all the hassle. Marek