[SystemSafety] Candidates for the firing squad

David Crocker dcrocker at eschertech.com
Fri Sep 21 10:26:01 CEST 2018


This is one of many reasons why I much prefer writing in a subset of C++
to C. In C++'11 and later you can specify the underlying type used to
store your enumeration. It's obviously sensible to to have a coding rule
that requires you to use that facility when declaring an enumeration.

David Crocker, Escher Technologies Ltd.
http://www.eschertech.com
Tel. +44 (0)20 8144 3265 or +44 (0)7977 211486

On 21/09/2018 07:12, David Haworth wrote:
> Typical example: a range check on an enumerated type. Because
> the signedness is implementation-defined, if you test for < 0
> you'll get a warning (expression is always true) sometimes.
> But you can't leave it out ...



More information about the systemsafety mailing list