Liste des Groupes | Revenir à cl c |
On Wed, 09 Apr 2025 14:44:39 -0700There have been a variety of things under discussion here, but I think this particular one was about the linkage rules in C if an identifier is declared with "static int foo;" and/or "extern int foo;" and/or "int foo;" at file scope, possibly in different orders. My thought was that one influence on the rules was consistency of existing code after "extern" was added to the language, but it seems unlikely since no one knows of an early C without "extern".
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
Michael S <already5chosen@yahoo.com> writes:O.k. Then David Brown will have to look for different justification forOn Wed, 9 Apr 2025 12:58:08 +0200>
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
On 09.04.2025 11:42, David Brown wrote:>On 08/04/2025 18:28, bart wrote:>[...]>
I believe the meaning of "extern" in combination with other
storage-class specifiers was picked to work with existing old
code from before "extern" was added to the language.
Assuming you mean the "C" language I don't quite understand the
last part of the sentence. Wasn't 'extern' already in "K&R" - so
what was "the language" before the addition of 'extern'?
>
Or did you just mean to say "[...] before _combinations_ of
'extern' and other storage-class specifier were added to the
language."
>
Janis, puzzled
K&R was published in 1978, 5 years after C got its first users.
Back in 1973-74 C language was significantly different from what it
became few years later.
The earliest C reference I have is cman74.pdf, currently at
<http://cm.bell-labs.co/who/dmr/cman74.pdf>. It includes "extern" in
the list of keywords.
>
It was inherited from B, which had "extrn" as a keyword as of 1972.
>
this particular misfeature of great majority of Unix implementations of
C language.
Les messages affichés proviennent d'usenet.