[Simh] Single stepping.

Paul Koning paulkoning at comcast.net
Mon Jan 30 08:57:37 EST 2017


> On Jan 30, 2017, at 8:05 AM, Bob Supnik <bob at supnik.org> wrote:
> 
> ...
> Converting sim_step to uint32 should quiesce compilers that are fussy about integer overflow or wraparound on variable i. 

It would be good to make that change, because according to the C standard, overflow is undefined on signed data types.  So compiler can (and some definitely do) make optimizations based on overflow not being allowed.  Conversely, unsigned types do allow overflow (wrap).  So in cases where you want that, the standard says you have to use an unsigned type.

C is a mess... this is just one example, where two unrelated properties (wrapping and signedness) are tied together by the language rules.

	paul




More information about the Simh mailing list