[Swan-dev] NULL pointer initialization [was Re: Fwd: [Swan-commit] Changes to ref refs/heads/master]

D. Hugh Redelmeier hugh at mimosa.com
Mon Jul 16 14:54:54 UTC 2018

| From: Andrew Cagney <andrew.cagney at gmail.com>

| > My POV is to follow the C standard where possible.  The C standard does
| > not provide the guarantee.  Intentionally.
| The systems we target do; so lets not make things harder than they already are.

The hardware we target happens to.  As far as we know.  But we're not
talking to the hardware, we're talking to a compiler (or several
compilers).  Our contract is with the language (augmented by POSIX,
but I don't imagine POSIX says anything about this).  I have seen no
guarantee there.

As far as I know, the language specs give license to the compiler
to optimize away things you count on because you are accessing the
memory with different types.

Now, in fact, the language specs also give special meaning to accesses
via unsigned char.

So I don't know.  But if I don't know, most programmers don't know.
(They may well think that they know, but that is quite a different

More information about the Swan-dev mailing list