Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: "A diagram of C23 basic types"
Date: Fri, 11 Apr 2025 09:34:58 -0700
Organization: A noiseless patient Spider
Lines: 69
Message-ID: <867c3qbqrx.fsf@linuxsc.com>
References: <87y0wjaysg.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Fri, 11 Apr 2025 18:34:59 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="71ab0539a1cf710e3caa6c34edacc1d7"; logging-data="2122660"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4h9bxnUFjANSKxUM+X7XSqCO39X0esDI="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:HaV25T6OyNmwDH4Io+sY60K3zjM= sha1:6/89yDHAbEwgP4HRnPBY53+aUj0=
Xref: csiph.com comp.lang.c:392395
Alexis writes:
> 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/
That diagram gets an F for presentation.
I can't help feeling that the information could have been
presented in a form that is simpler and easier to take in.
Disclaimer: the outline below is meant to convey all the
information that is present in the diagram (and perhaps a tiny
bit more), but I'm not sure I got everything, and I probably
didn't. YGWYPF.
Disclaimer 2: the notation used is meant to be self-explanatory.
Don't blame me if it isn't. :/
Scalar
Pointer
[regular]
nullptr_t
Arithmetic (basic)
Complex (floating)
_Complex float
_Complex double
_Complex long double
Real
Real floating (floating)
decimal floating
_Decimal32
_Decimal64
_Decimal128
[plain]
float
double
long double
Integer
Enumeration (! basic)
Standard
char (char) (promotes)
Standard Signed Integer (signed integer)
signed char (char) (promotes)
signed short (promotes)
signed int
signed long
signed long long
[unadorned int]
Standard Unsigned Integer (unsigned integer)
_Bool
unsigned char (char)
unsigned short (promotes)
unsigned int
unsigned long
unsigned long long
Extended
Extended Signed (signed integer)
Extended Unigned (unsigned integer)
Bit-precise integers
Bit-precise signed integer [* widths]
Bit-precise unsigned integer [* widths]
unsigned _BitInt[1]
Incidentally, [unadorned int] is meant to reflect the difference
between using 'int' and 'signed int' for the type of a bitfield.
I don't know if that distinction still exists in C23.