Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c    |    Meh, in C you gotta define EVERYTHING    |    243,242 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 241,768 of 243,242    |
|    James Kuyper to Tristan Wibberley    |
|    Re: Semantic properties of finite string    |
|    02 Nov 25 20:58:45    |
      From: jameskuyper@alumni.caltech.edu              On 2025-11-01 16:42, Tristan Wibberley wrote:       > On 01/11/2025 03:46, Kaz Kylheku wrote:       ...       >> When a program makes use of an external name (other than in certain       >> ways like "sizeof name") and that name is not defined exactly once       >> the behavior is undefined.       >       > Does it have to be defined in C?              No, but the behavior of C code that has been linked with non-C code is       undefined "by the omission of any explicit definition of behavior." by       the C standard. It might be defined by other documents.        >       >> Linking is not required to fail with a diagostic in that situation, and       >> that has certain implications of practical importance.       >>       >> For instance, if you are on Unix, this program will succesfully       >> link, even though it uses a function which is not in the program       >> and not in the standard C language:       >       > What is under the scope of the term "the program" and how does that       > compare to "the translation unit" ?              "A source file together with all the headers and source files included       via the preprocessing directive #include, less any source lines skipped       by any of the conditional inclusion preprocessing directives, is called       a _translation unit_. ... Translation units may be separately translated       and then later linked to produce an executable program."              The term "translation unit" is italicized, which is an ISO convention       indicating that the sentence in which it occurs constitutes the       definition of the italicized term.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca