🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #12579

Re: 64-bit chips, 32-bit compatibility?

#12579
From: Graham
Date: Tue, 26 Sep 1995 13:20
20 lines
1412 bytes
> I think that we can see the problem here: we're straining C's type system,
> because the usual `char', `short', `int', and `long' just can't cover 
> enough.  I'd very much like to see some sort of de-facto standard way to 
> specify the number of bits for an integral type, with both `exact' and `at 
> least' sizes.  This would make it easier to write portable programs, 
> without a lot of crap, and it would return old types like `int' to what 
> they're supposed to be.

Well, in Ada you can write

    type int is range -2**31 .. 2**31 - 1;
    type uint is mod 2**32;

which defines 32-bit signed and unsigned integer types.  What could be more
precise or portable?  (The underlying implementation is free to use 
32-bit, 64-bit, or 87-bit words to represent these types, and if you're 
concerned about physical representation, you can use a representation 
clause to specify the bit size of the type.)

Paul
Technical Details
Message-ID: <448unl$8pi@lastactionhero.rs.itd.umich.edu>
Path: arc1-ca.pugleaf.net!news.itd.umich.edu!pbgraham
References: <43p1g8$s24@rbdc.rbdc.com> <43srit$94b@hermes.synopsys.com> <43tada$8i6@rbdc.rbdc.com> <jgkDFG9HJ.49x@netcom.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.itd.umich.edu!pbgraham
From: pbgraham@umich.edu (Graham)
Newsgroups: comp.arch,comp.lang.c
Subject: Re: 64-bit chips, 32-bit compatibility?
Date: 26 Sep 1995 13:20:53 GMT
Organization: University of Michigan
Message-ID: <448unl$8pi@lastactionhero.rs.itd.umich.edu>
References: <43p1g8$s24@rbdc.rbdc.com> <43srit$94b@hermes.synopsys.com> <43tada$8i6@rbdc.rbdc.com> <jgkDFG9HJ.49x@netcom.com>
NNTP-Posting-Host: galaxian.rs.itd.umich.edu
Keywords: word