Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: on an analogy for verifying whether another digit fits (into an unsigned type) Date: Mon, 24 Jan 2022 21:14:44 -0800 Organization: None to speak of Lines: 52 Message-ID: <87mtjkmm63.fsf@nosuchdomain.example.com> References: <86mtjws9cg.fsf@levado.to> <6df246f4-204e-4fd1-ad91-bb4fce96f100n@googlegroups.com> <87pmoixf59.fsf@nosuchdomain.example.com> <87v8y8n1z5.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="fbd031f938b902ca86c8b061f35a7f8c"; logging-data="5351"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6aO33QPFjbirnrSARzQn1" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:mgARXw776Uch5Th1+dcLGFBeTMg= sha1:TFGzanFP6L4YcdtAbbR3xXJgOcI= Xref: csiph.com comp.lang.c:164603 Bart writes: > On 24/01/2022 23:33, Keith Thompson wrote: >> Bart writes: >>> On 24/01/2022 15:51, Scott Lurndal wrote: >>>> Bart writes: >> [...] >>>>> bcc/tcc fail with a link error, unless I include this line: >>>> Then they are POS compilers, or you're using them incorrectly, >>>> such as forgetting to include . >>> >>> I said it's a link error. They both depend on the msvcrt.dll library >>> for standard C functions, and strtoull is not defined in that >>> library. (It is defined inside ucrtbase.dll, but then that's missing >>> stuff like printf.) >> An aside: I have three different versions of msvcrt.dll on my >> Windows >> system. None of them appear to support strtoll or strtoull. >> >>> As certain people are so fond of reminding me, the library is a >>> completely different entity from the compiler, so it is apparently not >>> a compiler problem as both provide a proper API entry for that >>> function. >> I think that may be the first time you've actually acknowledged >> that. >> However, it's not necessary for the compiler itself to have a >> "proper API entry" for a library function, or to know anything >> about it. Using strtol as an example (since it's supported all the >> way back to C89/C90), the compiler knows how to call it because it >> sees the declaration in . > > The declaration is what I mean by 'API' entry. I'm using 'API' to mean > all the information needed by the programmer to write calls to a > function, and for the compiler to check those calls and generate the > proper code, usually inside some header file. You said that "both provide a proper API entry for that function", where the context indicated that "both" referred to the compiler and the runtime library. The compiler needs to *see* a C function declaration (a clearer description IMHO than "proper API entry"), presumably in a header file, but that declaration is not provided by the compiler itself. (Some headers might be distributed as part of the same package as the compiler rather than as part of the runtime library; for example gcc provides .) I think we both understand all this. Please don't obfuscate it further. [...] -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips void Void(void) { Void(); } /* The recursive call of the void */