Liste des Groupes | Revenir à c arch |
Thomas Koenig <tkoenig@netcologne.de> schrieb:It depends::
>"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).
Les messages affichés proviennent d'usenet.