Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Shao Miller <sha0.miller@gmail.com> |
|---|---|
| Newsgroups | comp.std.c, comp.lang.c |
| Subject | Re: Types in C |
| Date | 2011-05-30 18:30 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <is15pu$ahd$1@dont-email.me> (permalink) |
| References | <irbo6c$ul$1@speranza.aioe.org> <is0vfg$vqg$1@dont-email.me> <is14v9$f62$1@speranza.aioe.org> |
Cross-posted to 2 groups.
On 5/30/2011 5:16 PM, jacob navia wrote:
> Le 30/05/11 22:42, Marcin Grzegorczyk a écrit :
>> jacob navia wrote:
>>> [...]
>>> A C type can be either a function type, an incomplete type or an object
>>> type.
>>
>> Recently the Committee agreed with Clive Feather that completeness is a
>> scoped property of object types (there are no incomplete function types,
>> after all), and the latest C1X draft says the following under 6.2.5
>> ("Types"):
>>
>> # Types are partitioned into object types (types that describe objects)
>> # and function types (types that describe functions). At various points
>> # within a translation unit an object type may be incomplete (lacking
>> # sufficient information to determine the size of objects of that type)
>> # or complete (having sufficient information).
>>
>> I, too, believe it is a clearer way of describing how the C type system
>> works. (For Clive's rationale, see the WG14 document N1439).
>
> After reading N1439 I would tend to agree with what it says but
> where should go the void type?
>
> It is void an object type?
>
Yes. But it can never be completed.
> What was easy to understand in the original classification is that void
> had a natural neighborhood: incomplete types.
>
> I deduce (indirectly) that Mr Cleaver
(Nit-pick: Mr. Clive Feather.)
> thinks void is an object type
> because he says:
>
> 6.3.2.1#1
> Change “an object or incomplete type other than void” to “an object
> type other than void”.
>
> If "an object type other than void" is accepted it would mean that
> void is an object type.
>
Agreed.
> The problem is that N1429 is difficult to read because it only
> refers to what should be patched and doesn't display the patched
> text.
>
> In any case thanks a lot for taking the time to answer.
In the N1494 draft, we have 6.2.5p19:
"The void type comprises an empty set of values; it is an incomplete
object type that cannot be completed."
Similarly:
typedef char a_incomplete[];
could never be completed, if I'm not mistaken.
Back to comp.std.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Types in C jacob navia <jacob@spamsink.net> - 2011-05-22 21:29 +0200
Re: Types in C Keith Thompson <kst-u@mib.org> - 2011-05-22 12:48 -0700
Re: Types in C Marcin Grzegorczyk <mgrzegor@poczta.onet.pl> - 2011-05-30 22:42 +0200
Re: Types in C Shao Miller <sha0.miller@gmail.com> - 2011-05-30 17:45 -0500
Re: Types in C Keith Thompson <kst-u@mib.org> - 2011-05-31 08:47 -0700
Re: Types in C Shao Miller <sha0.miller@gmail.com> - 2011-05-31 13:54 -0400
Re: Types in C Tim Rentsch <txr@alumni.caltech.edu> - 2011-05-31 22:38 -0700
Re: Types in C Shao Miller <sha0.miller@gmail.com> - 2011-06-01 07:22 -0500
Re: Types in C Tim Rentsch <txr@alumni.caltech.edu> - 2011-06-01 12:13 -0700
Re: Types in C jacob navia <jacob@spamsink.net> - 2011-05-31 00:16 +0200
Re: Types in C Shao Miller <sha0.miller@gmail.com> - 2011-05-30 18:30 -0500
Re: Types in C Tim Rentsch <txr@alumni.caltech.edu> - 2011-05-31 22:43 -0700
Re: Types in C Shao Miller <sha0.miller@gmail.com> - 2011-06-01 07:41 -0500
Re: Types in C Tim Rentsch <txr@alumni.caltech.edu> - 2011-06-01 12:23 -0700
Re: Types in C Marcin Grzegorczyk <mgrzegor@poczta.onet.pl> - 2011-06-02 22:44 +0200
Re: Types in C jacob navia <jacob@spamsink.net> - 2011-06-02 22:49 +0200
Re: Types in C Keith Thompson <kst-u@mib.org> - 2011-06-02 15:26 -0700
csiph-web