🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #750

Re: variadic min and max, (any some and none, cat and more)

#750
From: bartc
Date: Sun, 25 Oct 2026 01:40
37 lines
2718 bytes
On 25/10/2026 00:34, Keith Thompson wrote:
> bartc <bc@freeuk.com> writes:
> [...]
>> Still talking about variadic functions? Then in C it's more
>> restricted: variadic arguments will be, or be promoted to, one of:
>>
>> * Integer (typically one of i32 u32 i64 u64)
>>
>> * Float (typically f64)
>>
>> * Pointer
>>
>> * Struct
>>
>> The last is more variable, but on modern ABIs, a struct that isn't one
>> of certain set of patterns will be passed by pointer. (I don't know
>> how _BitInt are handled.)
> [...]
> 
> That's an odd and incomplete way to state the rules (and you
> missed unions).

They will be grouped with structs.


> A variadic argument of an integer type narrower than int is promoted
> to int or unsigned int (int if int holds all possible values of the
> source type, otherwise unsigned int).  These "integer promotions"
> do not apply to _BitInt types.  A variadic argument of type float is
> promoted to double.  All other argument types are not promoted --
> though the usual array-to-pointer and function-to-pointer conversions
> are applied.

The list represented variadic argument types after promotions. It was 
anywhere summarising existing variadic functions as it wasn't clear to 
which kinds Mr .bleu was referring to.
Technical Details
Message-ID: <11bjmml$37qje$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11bes8b$1gncr$1@dont-email.me> <11bf84v$1jkb5$1@dont-email.me> <11bfdcs$1mvrv$1@dont-email.me> <11bi1pg$2ke58$2@dont-email.me> <11bi3bf$2l005$1@dont-email.me> <11bjf9d$35feb$2@kst.eternal-september.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: bartc <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: variadic min and max, (any some and none, cat and more)
Date: Sun, 25 Oct 2026 01:40:36 +0000
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <11bjmml$37qje$1@dont-email.me>
References: <11bes8b$1gncr$1@dont-email.me> <11bf84v$1jkb5$1@dont-email.me>
 <11bfdcs$1mvrv$1@dont-email.me> <11bi1pg$2ke58$2@dont-email.me>
 <11bi3bf$2l005$1@dont-email.me> <11bjf9d$35feb$2@kst.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 25 Oct 2026 01:40:38 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3402350"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19bRrv6nyBX05b4D149Cu8c"; posting-host="1a674fee9f6b34c55d86342b13471feb"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:IiZB1jkZ1zzAQzMK1Rz6LI3cXWI= sha256:U5V8SdbqT3napxJAJb77QnpQ0dIgooEDqtFSRnu/cv8=
	sha1:zQwzZjMP1T22kXpS+VGHcTCYgWQ= sha256:0joaeZTqmvCCw2QRSd4RS794flCdI290sLMJt9QZi3Q=
Content-Language: en-GB
In-Reply-To: <11bjf9d$35feb$2@kst.eternal-september.org>