[Cryptography] GCC bug 30475 (was Re: bounded pointers in C)
Jerry Leichter
leichter at lrw.com
Fri May 2 13:46:57 EDT 2014
On May 2, 2014, at 4:09 AM, Alan Braggins <alan.braggins at gmail.com> wrote:
>> As I see it, the C language standards need to move some of the
>> "undefined" behaviors into a different category, lets call it "target
>> machine defined".
>
> Why not call it "implementation defined" which has the advantage of
> being what the existing standard already calls that category?
As I pointed out earlier, "implementation defined" requires that the result fit into the abstract machine model used to define C's semantics. That model has no notion of anything like a trap. So "trap on overflow" cannot be the "defined" behavior of any implementation.
Of course, a particular implementation might well explain what it means to "trap" and then go ahead and then go on to say than an overflow causes a trap. But then an implementation could define a type that does ternary arithmetic if it so chose. The Standard does and and cannot define, or limit, behavior outside of the domain the Standard covers.
-- Jerry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4813 bytes
Desc: not available
URL: <http://www.metzdowd.com/pipermail/cryptography/attachments/20140502/69f4265c/attachment.bin>
More information about the cryptography
mailing list