[ub] [c++std-ext-14592] Re: Re: Sized integer types and char bits
John Regehr
regehr at cs.utah.edu
Sun Oct 27 17:08:26 CET 2013
>> Wow-- anyone care to guess what fraction of existing C programs run
>> correctly under these conditions?
> Define correctly.
A conforming program could be said to run correctly under a
non-conforming C implementation if some test suite fails to find
anything wrong with the program.
For example it's not uncommon to see programs that use
1<<(sizeof(int)*CHAR_BIT-1) instead of INT_MIN. Any such program would
be highly unlikely to run correctly on the 36-bit ones complement C
implementation.
John
More information about the ub
mailing list