Article View: comp.std.c
Article #3781Re: Why "long long" doesn't work.
From: FFarance
Date: Fri, 18 Aug 1995 19:59
Date: Fri, 18 Aug 1995 19:59
42 lines
2715 bytes
2715 bytes
> From: halasz@caip.rutgers.edu
>
> I suspect that all theze exact lengths are there becauz the lengths are
> exact: that is, a 32-bit-long 'int' is declared becauz the programmer
wants
> all the bits that the processor has. In concluzion, I suspect that the
> exact lengths are a matter of inquirie: I wish this manie, I get
houmanie
> for my wish?
That's the rationale for the at-least type: I want X bits (specified
precision), how many did I get (actual precision). The exact types
are there to give exact semantics: I want exactly Z bits. The semantics
of "exact:Z" are the same as a bit field of Z bits except that the
container that it is stored in is addressable (you can't take the address
of a bit field) and you can take its size ("sizeof" returns the size of
the container). Like bit fields, the operations are performed *as if*
bit masking were performed. Like bit fields, the same optimizations are
available for avoiding masking when possible. Since signed bit fields
aren't portable, you'd probably use an unsigned exact type for a
``strictly conforming style'' (*). However, I can think of many reasons
to use signed exact types in a ``conforming style'' (*).
(*) The use of ``strictly conforming style'' and ``conforming style''
(my terms) don't mean the same thing as ``strictly conforming program''
or ``conforming program'' (C Standard terms). Since a ``strictly
conforming
program'' refers to its input, the program, and its (unchanging) output,
I can't use this term precisely because I haven't specified a program,
but program fragments. When I say ``strictly conforming style'', I'm
assumimg that (1) the fragments were included in a complete program,
(2) inputs were specified, (3) the value of every sub-expression were
printed, (4) the outputs were unchanging across implementations. A
``conforming style'' means that (1) the fragments were included in a
complete program, (2) the program is acceptable to the compiler.
-FF
-------------------------------------------------------------------
(``I only use AOL for reading netnews.'')
Frank Farance, Farance Inc.
E-mail: frank@farance.com, Telephone: +1 212 486 4700
ISO JTC1/SC22/WG14 & ANSI X3J11 (C Programming Language) Project Editor
Technical Details
Message-ID:
<412rfv$bs9@newsbf02.news.aol.com>Path:
arc1-ca.pugleaf.net!newsbf02.news.aol.com!not-for-mailReferences:
<412ec1$dt0@caip.rutgers.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!newsbf02.news.aol.com!not-for-mail From: ffarance@aol.com (FFarance) Newsgroups: comp.std.c Subject: Re: Why "long long" doesn't work. Date: 18 Aug 1995 15:59:59 -0400 Organization: America Online, Inc. (1-800-827-6364) Sender: root@newsbf02.news.aol.com Message-ID: <412rfv$bs9@newsbf02.news.aol.com> References: <412ec1$dt0@caip.rutgers.edu> Reply-To: ffarance@aol.com (FFarance) NNTP-Posting-Host: newsbf02.mail.aol.com