Re: else ladders practice

Liste des GroupesRevenir à cl c  
Sujet : Re: else ladders practice
De : bc (at) *nospam* freeuk.com (Bart)
Groupes : comp.lang.c
Date : 25. Nov 2024, 12:35:20
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vi1ndo$2of44$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Mozilla Thunderbird
On 25/11/2024 03:17, Keith Thompson wrote:
Bart <bc@freeuk.com> writes:
On 24/11/2024 21:45, Keith Thompson wrote:
Bart <bc@freeuk.com> writes:
[...]
A more useful installation would of course need more standard headers,
an assembler, linker, and whatever .a files are needed to provide the
standard library.
Sure, those are all part of a C implementation, though they're not
part of gcc.
>
This seems to be a thing with Linux, where a big chunk of a C
implementation is provided by the OS.
 I'm not sure what you mean by "provided by the OS".  Linux-based
systems tend to be very modular, with almost everything provided by
some installable binary package.  Some of those packages have to
be provided by default, for example any dynamic libraries relied
on by most executables.  Files that are needed for development,
such as header files, compilers, and associated tools such as
assemblers and linkers, may be optional.
Well, does a C compiler for Linux come with its own stdio.h, or does it share /usr/include/stdio.h along with other compilers?
C compilers for Windows tend to be self-contained. Except for clang (see below). So each has its own stdio.h.
The only thing the OS provides is msvcrt.dll, a library of C standard functions, one which probably started out for internal use but too many programs now rely on it.

 
That is, standard headers, libraries, possibly even 'as' and 'ld'
utilities.
 On my system (Ubuntu), the as and ld commands are provided by the
binutils package ("binutils-x86-64-linux-gnu").  Some distributions
may install these by default.  Others do not, but they're easy
to install.
 
            On Windows, C compilers tend to be self-contained (except
for Clang which appears to be parasitical: it used to piggy-back onto
gcc, then it switched to MSVC).
 I don't know what you mean by "piggy-back onto gcc".
It relies for things like header files, linkers and libraries on an existing gcc installation.
I used clang for 18 months before I realised this.
Then they changed over to relying on MSVC for those facilities. This is when it started having trouble finding and syncing to MSVC, even when I had a working CL compiler.

 
I'm not sure what the utility to compile C programs is called, if it
is not 'gcc'. But this is a C group, I would expect people to know it
is a C compiler, or the front end of one.
>
However I use 'gcc' in other forums and everyone knows what I mean.
>
What do /you/ call the C compiler that is invoked by gcc?
 I call it gcc.
 "gcc" is the name for several things.  It's the "GNU Compiler
Collection".  It's the command invoked as the driver for any of
several compilers that are part of the GNU Compiler Collection.
It can refer specifically to the C compiler.  It's mildly confusing
for historical reasons, but most people don't have much of a
problem with it, and don't pretend that it's more confusing than
it really is.
But you seem to like pointing out that gcc doesn't include header files, assemblers, linkers and libraries. And previously you claimed that:
  "gcc by itself can't compile hello.c to hello.s."
So, what does it need? Is your point that it invokes a separate program like 'cc1.exe'? (Plus those 3 other binaries I listed in the case of tdm.)
You also said:
"You can't compile hello.c to hello.s without an OS kernel"
I guess you mean that it needs on OS to provide a file system, means to launch an executable like gcc.exe in the first place, and a display for messages?
That's a rather silly one. (However my first compiler did run on bare metal!)
 >>And hello.s isn't useful without an assembler, which is not treated as part of gcc
I deliberately stopped at the assembly file because I knew you would leap at that.
I assume that turning a .c file into .s/.asm is the very definition of what a baseline C compiler is expected to do.
It seems you are still disputing this and casting confusing. C compilers for Windows such as lccwin32, Pelles C, DMC, tcc, my mcc/cc are all self-contained and can turn hello.c all the way to hello.exe.
It is gcc that is always the exception, in every way (like generating a.exe files by default, or thinking that HELLO.C must be a C++ file).

Date Sujet#  Auteur
31 Oct 24 * else ladders practice255fir
31 Oct 24 +* Re: else ladders practice9Anton Shepelev
31 Oct 24 i+- Re: else ladders practice1fir
31 Oct 24 i`* Re: else ladders practice7James Kuyper
1 Nov 24 i `* Re: else ladders practice6David Brown
2 Nov 24 i  +* Re: else ladders practice2James Kuyper
2 Nov 24 i  i`- Re: else ladders practice1David Brown
2 Nov 24 i  `* Re: else ladders practice3fir
2 Nov 24 i   +- Re: else ladders practice1David Brown
2 Nov 24 i   `- Re: else ladders practice1James Kuyper
31 Oct 24 +* Re: else ladders practice5Richard Harnden
31 Oct 24 i+* Re: else ladders practice3fir
31 Oct 24 ii`* Re: else ladders practice2fir
31 Oct 24 ii `- Re: else ladders practice1fir
31 Oct 24 i`- Re: else ladders practice1Bonita Montero
31 Oct 24 +* Re: else ladders practice22Dan Purgert
31 Oct 24 i+* Re: else ladders practice3fir
31 Oct 24 ii`* Re: else ladders practice2Dan Purgert
31 Oct 24 ii `- Re: else ladders practice1fir
16 Nov 24 i`* Re: else ladders practice18Stefan Ram
16 Nov 24 i +* Re: else ladders practice5Bart
16 Nov 24 i i`* Re: else ladders practice4David Brown
19 Nov 24 i i `* Re: else ladders practice3Janis Papanagnou
19 Nov 24 i i  +- Re: else ladders practice1David Brown
19 Nov 24 i i  `- Re: else ladders practice1Michael S
16 Nov 24 i +* Re: else ladders practice3James Kuyper
19 Nov 24 i i`* Re: else ladders practice2Janis Papanagnou
1 Dec 24 i i `- Re: else ladders practice1Tim Rentsch
16 Nov 24 i +* Re: else ladders practice2Lew Pitcher
17 Nov 24 i i`- Re: else ladders practice1Tim Rentsch
20 Nov 24 i +* Re: else ladders practice3Dan Purgert
30 Nov 24 i i`* Re: else ladders practice2Rosario19
5 Dec 24 i i `- Re: else ladders practice1Dan Purgert
1 Dec 24 i `* Re: else ladders practice4Waldek Hebisch
1 Dec 24 i  `* Re: else ladders practice3Janis Papanagnou
2 Dec 24 i   `* Re: else ladders practice2Waldek Hebisch
2 Dec 24 i    `- Re: else ladders practice1Janis Papanagnou
31 Oct 24 +- Re: else ladders practice1Janis Papanagnou
31 Oct 24 `* Re: else ladders practice217Bart
1 Nov 24  `* Re: else ladders practice216fir
1 Nov 24   +* Re: else ladders practice198Bart
1 Nov 24   i+* Re: else ladders practice196fir
1 Nov 24   ii`* Re: else ladders practice195Bart
1 Nov 24   ii `* Re: else ladders practice194fir
1 Nov 24   ii  `* Re: else ladders practice193fir
1 Nov 24   ii   `* Re: else ladders practice192Bart
1 Nov 24   ii    `* Re: else ladders practice191David Brown
1 Nov 24   ii     `* Re: else ladders practice190Bart
1 Nov 24   ii      `* Re: else ladders practice189David Brown
1 Nov 24   ii       `* Re: else ladders practice188Bart
2 Nov 24   ii        `* Re: else ladders practice187David Brown
2 Nov 24   ii         `* Re: else ladders practice186Bart
3 Nov 24   ii          +- Re: else ladders practice1Tim Rentsch
3 Nov 24   ii          +* Re: else ladders practice4fir
3 Nov 24   ii          i`* Re: else ladders practice3Bart
3 Nov 24   ii          i `* Re: else ladders practice2fir
3 Nov 24   ii          i  `- Re: else ladders practice1fir
3 Nov 24   ii          +* Re: else ladders practice4fir
3 Nov 24   ii          i`* Re: else ladders practice3Bart
3 Nov 24   ii          i `* Re: else ladders practice2fir
3 Nov 24   ii          i  `- Re: else ladders practice1fir
3 Nov 24   ii          +* Re: else ladders practice35David Brown
3 Nov 24   ii          i+- Re: else ladders practice1Kaz Kylheku
3 Nov 24   ii          i+* Re: else ladders practice23Bart
4 Nov 24   ii          ii+* Re: else ladders practice21David Brown
4 Nov 24   ii          iii`* Re: else ladders practice20Bart
4 Nov 24   ii          iii +* Re: else ladders practice2David Brown
5 Nov 24   ii          iii i`- Re: else ladders practice1Bart
5 Nov 24   ii          iii `* Re: else ladders practice17David Brown
5 Nov 24   ii          iii  +* Re: else ladders practice2Bart
5 Nov 24   ii          iii  i`- Re: else ladders practice1David Brown
6 Nov 24   ii          iii  +* Re: else ladders practice5Bart
6 Nov 24   ii          iii  i`* Re: else ladders practice4David Brown
6 Nov 24   ii          iii  i `* Re: else ladders practice3Bart
7 Nov 24   ii          iii  i  `* Re: else ladders practice2David Brown
7 Nov 24   ii          iii  i   `- Re: else ladders practice1Bart
9 Nov 24   ii          iii  `* Re: else ladders practice9Janis Papanagnou
9 Nov 24   ii          iii   `* Re: else ladders practice8David Brown
10 Nov 24   ii          iii    `* Re: else ladders practice7Janis Papanagnou
10 Nov 24   ii          iii     `* Re: else ladders practice6David Brown
19 Nov 24   ii          iii      `* Re: else ladders practice5Janis Papanagnou
19 Nov 24   ii          iii       `* Re: else ladders practice4David Brown
19 Nov 24   ii          iii        `* Re: else ladders practice3Janis Papanagnou
19 Nov 24   ii          iii         `* Re: else ladders practice2David Brown
20 Nov 24   ii          iii          `- Re: else ladders practice1Janis Papanagnou
9 Nov 24   ii          ii`- Re: else ladders practice1Janis Papanagnou
8 Nov 24   ii          i+* Re: else ladders practice9Janis Papanagnou
8 Nov 24   ii          ii+* Re: else ladders practice4David Brown
9 Nov 24   ii          iii`* Re: else ladders practice3Janis Papanagnou
9 Nov 24   ii          iii `* Re: else ladders practice2David Brown
10 Nov 24   ii          iii  `- Re: else ladders practice1Janis Papanagnou
9 Nov 24   ii          ii`* Re: else ladders practice4Bart
9 Nov 24   ii          ii `* Re: else ladders practice3Janis Papanagnou
9 Nov 24   ii          ii  `* Re: else ladders practice2Bart
10 Nov 24   ii          ii   `- Re: else ladders practice1Janis Papanagnou
8 Nov 24   ii          i`- Re: else ladders practice1Bart
5 Nov 24   ii          `* Re: else ladders practice141Waldek Hebisch
5 Nov 24   ii           +- Re: else ladders practice1fir
5 Nov 24   ii           +* Re: else ladders practice24David Brown
5 Nov 24   ii           i+* Re: else ladders practice17Waldek Hebisch
5 Nov 24   ii           ii`* Re: else ladders practice16David Brown
6 Nov 24   ii           i`* Re: else ladders practice6Bart
5 Nov 24   ii           `* Re: else ladders practice115Bart
1 Nov 24   i`- Re: else ladders practice1fir
2 Nov 24   `* Re: else ladders practice17Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal