Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Sort char array Date: Fri, 11 Oct 2019 11:51:43 -0700 Organization: None to speak of Lines: 32 Message-ID: References: <20191007131948.c9f28d44bcd105e7a153069a@g{oogle}mail.com> <2xFmF.867378$yH4.431562@fx18.am4> <20191007174244.385138503569a8bc6d4eec9d@g{oogle}mail.com> <20191008022725.36fbd95aa45ba185290e5e11@gmail.com> <1q_mF.841756$Zy3.585129@fx33.am4> <20191009020207.b533aa1c6d95f44eb314ffc1@gmail.com> <5alnF.1041354$WI2.353384@fx34.am4> <5b525fc7-aeb6-47ec-b425-526a60d31e92@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="fa3c8307132564ce59634920bb278689"; logging-data="11924"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/oZGg6bxswkCPh04ZTj+F1" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:mfq95INRvPz5t21C6o5opUOEnOA= sha1:3ujuCUxzF6MhNJMttxUij357uFk= Xref: csiph.com comp.lang.c:146879 James Kuyper writes: > On 10/11/19 2:16 PM, Keith Thompson wrote: >> James Kuyper writes: >> [...] >>> You should be able to count on any implementation that supports a >>> 128-bit 2's complement type with no padding bits, to support int128_t as >>> a typedef for that type. Unfortunately, I've been informed that this is >>> not the case, but that is cause for complaint to the implementer, not to >>> the committee. >> >> The problem with that is that intmax_t would then have to be at least >> 128 bits. There are ABIs that would break if the size of intmax_t >> (currently 64 bits on most systems) were changed. Thus __int128 is >> a gcc extension and is *not* classified as a standard or extended >> integer type. >> >> Which is a great pity IMHO. > > If there's a sufficiently good reason to justify having an interface > that is limited to 64 bits on a system capable of handling 128 bit > integers, that interface should be defined in terms of int*64_t, not > intmax_t. Of course, that's a lot easier said than done. There are standard library functions that refer to intmax_t and uintmax_t. Examples are printf() and scanf() with a "%jd" or "%ju" format, and a number of functions declared in (see 7.8.2, "Functions for greatest-width integer types). -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */