Sujet : Re: Computer architects leaving Intel...
De : tkoenig (at) *nospam* netcologne.de (Thomas Koenig)
Groupes : comp.archDate : 02. Sep 2024, 22:52:21
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vb58i5$303nc$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : slrn/1.0.3 (Linux)
Thomas Koenig <
tkoenig@netcologne.de> schrieb:
"Don't do this" or "don't do that" is not sufficient. Maybe you,
together with like-minded people, could try formulating some rules
as an extension to the C standard, and see where it gets you.
Maybe you can get it published as an annex.
Hm... putting some thought into it, it may be a good first step
to define cases for which a a diagnostic is required; maybe
"observable error" would be a reasonable term.
So, put "dereferencing a NULL pointer shall be an observable
error" would make sure that no null pointer checks are thrown
away, and that this requires a run-time diagnostic.
If that is the case, should dereferencing a member of a struct
pointed to by a null pointer also be an observable error, and
be required to be caught at run-time?
Or is this completely the wrong track, and you would like to do
something entirely different? Any annex to the C standard would
still be constrained to the abstract machine (probably).