Path: csiph.com!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Baby X is bor nagain Date: Sun, 23 Jun 2024 16:33:58 -0700 Organization: None to speak of Lines: 28 Message-ID: <87msnbtes9.fsf@nosuchdomain.example.com> References: <20240618115650.00006e3f@yahoo.com> <20240618184026.000046e1@yahoo.com> <877celzx14.fsf@nosuchdomain.example.com> <87iky3svqh.fsf@bsb.me.uk> <874j9nxsdy.fsf@nosuchdomain.example.com> <874j9ns382.fsf@bsb.me.uk> <86h6dlhb34.fsf@linuxsc.com> <8734p3rjno.fsf@bsb.me.uk> <86zfrbfsd6.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Mon, 24 Jun 2024 01:33:59 +0200 (CEST) Injection-Info: dont-email.me; posting-host="0a690d6294358a2c4bce5879f14e083a"; logging-data="590734"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ii9/HrwAcBdLBV8RHthvZ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:hMADS2bmpVC7N+KOwVT6qldOu30= sha1:T8fWqGsvdodXxV2ooam3+/eO5LM= Xref: csiph.com comp.lang.c:386415 Tim Rentsch writes: > James Kuyper writes: > [on the requirements for qsort] > >> I certainly would favor improved wording that made this clearer. >> In fact, simply explicitly mandating total ordering rather than >> making a vague comment about consistency would probably be the >> best approach. > > Clearly the C standard intends to impose a weaker requirement > than that the comparison function be a total ordering. "That is, for qsort they shall define a total ordering on the array". I presume you didn't intend to contradict that requirement, but I can't figure out what you meant -- unless, as Ben suggested, you're distinguishing between a total ordering of all possible arguments and a total ordering of objects present in the array. But even then, the standard explicitly imposes a total ordering. (The requirements for bsearch might be weaker, but we're discussing qsort.) Can you clarify what you meant? -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */