Re: Thou shalt have no other gods before the ANSI C standard
From: CBFalconer (cbfalconer_at_yahoo.com)
Date: 02/14/05
- Next message: CBFalconer: "Re: Thou shalt have no other gods before the ANSI C standard"
- Previous message: websnarf_at_gmail.com: "Re: Thou shalt have no other gods before the ANSI C standard"
- Maybe in reply to: D. J. Bernstein: "Thou shalt have no other gods before the ANSI C standard"
- Next in thread: Brian Inglis: "Re: Thou shalt have no other gods before the ANSI C standard"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 14 Feb 2005 15:10:24 GMT
"John E. Hadstate" wrote:
> "CBFalconer" <cbfalconer@yahoo.com> wrote in message
>
... snip ...
>
>> Think trap values.
>> For example, all we have to do is give up one negative value,
>> and we can dynamically detect use of uninitialized variables.
>
> Yes, but which one shall we designate for that purpose?
> 0x80000000? Nope, I like that for a lot of things.
> 0xFFFFFFFF? I don't think so. 0xCCCCCCCC? Well, that's nice
> until my random number generator counts to that state.
Has to be 0x80...0. A continuous set of negative integers from -1
down is required. Assuming 2's complement, else the optimum choice
would be 0..0 for 1's complement, with all 1s representing 0 and
arithmetic done with a subtractor.
>
>> Another high reliability configuration on a 32 bit physical word
>> would be a 26 bit integer, with a trap uninitialized value, and 6
>> bits ecc syndrome. I think that works. Note that, with an 8 bit
>> byte, sizeof(int) would still be 4.
>
> For such a monstrosity, I would expect the C compiler to
> generate code for 26-bit arithmetic and use a 13-bit char.
> I would expect sizeof(int) to be 2.
Won't work, because of the requirement to expose all bits via
unsigned chars. This also makes ints a suitable and reliable
repository for Unicode chars.
Please fix (or replace) your alleged newsreader so that it doesn't
rewrap everything it misquotes. It is a pain to have to go through
the quotations and fix the harm.
-- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
- Next message: CBFalconer: "Re: Thou shalt have no other gods before the ANSI C standard"
- Previous message: websnarf_at_gmail.com: "Re: Thou shalt have no other gods before the ANSI C standard"
- Maybe in reply to: D. J. Bernstein: "Thou shalt have no other gods before the ANSI C standard"
- Next in thread: Brian Inglis: "Re: Thou shalt have no other gods before the ANSI C standard"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|