Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: James Kuyper Newsgroups: comp.lang.c Subject: Re: "A diagram of C23 basic types" Date: Tue, 8 Apr 2025 14:14:36 -0400 Organization: A noiseless patient Spider Lines: 23 Message-ID: References: <87y0wjaysg.fsf@gmail.com> <20250402113624.693@kylheku.com> <86o6xdhorr.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 08 Apr 2025 20:14:37 +0200 (CEST) Injection-Info: dont-email.me; posting-host="a82decdcecbf2be3578dae3b9c5284d3"; logging-data="2930811"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fmZbV/JMWD7A7w1fRLdqjGGiDfyMUCIw=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:89LoiGg+i0cNNB/nv/hUp/uJBI4= Content-Language: en-US In-Reply-To: Bytes: 2481 On 4/8/25 04:39, David Brown wrote: > On 07/04/2025 20:35, James Kuyper wrote: >> On 4/3/25 18:00, Waldek Hebisch wrote: >>> Tim Rentsch wrote: >> ... >>>> Not always practical. A good example is the type size_t. If a >>>> function takes an argument of type size_t, then the symbol size_t >>>> should be defined, no matter which header the function is being >>>> declared in. >>> >>> Why? One can use a type without a name for such type. >> >> How would you declare a pointer to a function type such that it is >> compatible with such a function's type? > > The C23 "typeof" operator lets you work with the type of a value or > expression. So you first have an object or value of type "size_t", > that's all you need. Unfortunately, there are no convenient literal > suffixes that could be used here. I can see how that would work with the return type of a function, but how would it apply to an argument of a function?