Often one makes assumptions about a particular platform one is coding on, for example that signed integers use two's complement storage, or that (0xFFFFFFFF == -1)
, or things of that nature.
Does a tool exist which can check a codebase for the most common violations of these kinds of things (for those of us who want portable code but don't have strange non-two's-complement machines)?
(My examples above are specific to signed integers, but I'm interested in other errors (such as alignment or byte order) as well)
unspecified
notundefined
, which apparently is different. Not sure which is applicable here. - #2398484 – Rosenzweig1.3.25
: unspecified behavior behavior, for a well-formed program construct and correct data, that depends on the implementation (at least according to the C++0x FCD) – Nerval