• Re: Naughty C?

    From The Natural Philosopher@3:633/10 to All on Wed Jan 7 10:02:01 2026
    On 06/01/2026 23:10, Waldek Hebisch wrote:
    No, if you looked at what compilers in gcc are doing you
    will see that there are no intemediate C file. There
    is intermediate assembler, but between source file and
    assembler each compiler work independently

    I assumed so, but its nice to have it confirmed...

    AFAIK you can remove C compiler binary and other compilers in
    gcc will still work.

    That is news to me, but it makes sense.

    So, I'll basically
    stick with my 'translator' def. And if 'C' does not
    'natively support' something you can FAKE it with code,
    not really anything you CAN'T do with 'C'.
    A I wrote, you can use "via C" translators, but results are
    not so good as with dedicated compilers, that is why gcc
    contains separate compilers.

    By 'compiler' I mean "source in -> (agitating sounds) ->
    binary executable out.
    By that definition gcc does_not_ contain a C compiler:
    gcc generates assembly and then assembler and linker produce
    final executable. Things are more complicated when you use
    LTO, because "linker" in this case actially is doing large part
    of compiler work and optimized code before producing final
    executable. But non-LTO compilation works via assembly.

    And thank heavens it does. Sometimes examining the assembler is
    necessary, though thankfully fairly rarely these days.



    --
    "Strange as it seems, no amount of learning can cure stupidity, and
    higher education positively fortifies it."

    - Stephen Vizinczey



    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)