Deutsch   English   Français   Italiano  
<vsj1m8$1f8h2$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: "A diagram of C23 basic types"
Date: Wed, 2 Apr 2025 10:57:29 +0100
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <vsj1m8$1f8h2$1@dont-email.me>
References: <87y0wjaysg.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 02 Apr 2025 11:57:29 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6ec1d618f3662fc028ed5e5779922e31";
	logging-data="1548834"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19f84YhSppNCBVCCciyjAbi"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:3GNzAvxhB6TJXx9nKe3Si8VCZec=
Content-Language: en-GB
In-Reply-To: <87y0wjaysg.fsf@gmail.com>
Bytes: 2071

On 02/04/2025 06:59, Alexis wrote:
> 
> Thought people here might be interested in this image on Jens Gustedt's
> blog, which translates section 6.2.5, "Types", of the C23 standard
> into a graph of inclusions:
> 
>    https://gustedt.wordpress.com/2025/03/29/a-diagram-of-c23-basic-types/
> 

So much for C being a 'simple' language.

However the chart seems unnecessarily over-elaborate in some areas, 
while missing some features:

* I thought that enumerations could now have their own integer type

* Where are the fixed-width types from stdint.h?

* How does unsigned BitInt end up as a signed bit-precise version?

* What about bit-fields?

I also have trouble with 'basic type' used for BitInt which could be 
arbitrarily large, or for Complex types. Could they also end up as 
Scalars? It's hard to see when the coloured lines should be followed.

Anyway, the good thing is that if I now look at an Ada type hierarchy, 
it appears simple by comparison!

All enumeration/integer types end up as Discrete, and all float types as 
Real; together they are Scalars.