• =?UTF-8?Q?Re=3A_Naughty_C=E2=99=AF?=

    From The Natural Philosopher@tnp@invalid.invalid to comp.os.linux.misc,alt.folklore.computers on Wed Jan 7 10:02:01 2026
    From Newsgroup: alt.folklore.computers

    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


    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.linux.misc,alt.folklore.computers on Wed Jan 7 11:53:07 2026
    From Newsgroup: alt.folklore.computers

    In article <ZN-dnY--SfIc4MD0nZ2dnZfqnPednZ2d@giganews.com>,
    c186282 <c186282@nnada.net> wrote:
    On 1/6/26 07:16, Waldek Hebisch wrote:
    In alt.folklore.computers c186282 <c186282@nnada.net> wrote:
    <snip>
    Hmm ... look at all the GNU 'compilers' -
    FORTRAN, COBOL, Ada, 'D', M2, Rust,C++,
    G++, even Algol-68. None are 'compilers'
    per-se, but to-'C' TRANSLATORS. So, 'C',
    pretty much All Are One And One Is All.

    No. Compiler as first stage translate given language to a
    common representation. This representatiton is different
    than C. Ada and GNU Pascal have parametrized types, there
    is nothing like that in C. C++ (and some other languages)
    have exceptions, C do not have them. There are several
    smaller things, for example Ada or Pascal modulo is different
    that C/Fortran modulo. During optimization passes gcc
    keeps such information, to allow better optimization and
    error reporting.

    There were/are compilers that work by translating to C. But
    this has limitations: generated code typically is worse because
    language specific information is lost in translation. Error
    reporting is worse because translator is not doing as many
    analyzes as gcc do. For those reasons compilers in gcc
    generate common representation which contains sum of features
    of all supported languages and not C.

    You give it a file in whatever lang, it produces
    a file in 'C' and compiles that.

    No. That's not how it works. This is factually wrong.

    - Dan C.

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Peter Flass@Peter@Iron-Spring.com to comp.os.linux.misc,alt.folklore.computers on Wed Jan 7 07:34:47 2026
    From Newsgroup: alt.folklore.computers

    On 1/6/26 14:24, c186282 wrote:
    On 1/6/26 07:16, Waldek Hebisch wrote:
    In alt.folklore.computers c186282 <c186282@nnada.net> wrote:
    <snip>
       Hmm ... look at all the GNU 'compilers' -
       FORTRAN, COBOL, Ada, 'D', M2, Rust,C++,
       G++, even Algol-68. None are 'compilers'
       per-se, but to-'C' TRANSLATORS. So, 'C',
       pretty much All Are One And One Is All.

    No.  Compiler as first stage translate given language to a
    common representation.  This representatiton is different
    than C.  Ada and GNU Pascal have parametrized types, there
    is nothing like that in C.  C++ (and some other languages)
    have exceptions, C do not have them.  There are several
    smaller things, for example Ada or Pascal modulo is different
    that C/Fortran modulo.  During optimization passes gcc
    keeps such information, to allow better optimization and
    error reporting.

    There were/are compilers that work by translating to C.  But
    this has limitations: generated code typically is worse because
    language specific information is lost in translation.  Error
    reporting is worse because translator is not doing as many
    analyzes as gcc do.  For those reasons compilers in gcc
    generate common representation which contains sum of features
    of all supported languages and not C.

      You give it a file in whatever lang, it produces
      a file in 'C' and compiles that. 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'.

      By 'compiler' I mean "source in -> (agitating sounds) ->
      binary executable out.

      I think there are still a few FORTRAN compilers out
      there for Linux, maybe COBOL too. There's at least
      one forth IDE/compiler. Digital Mars makes 'C' and
      'D' compilers. GCC is not the alpha and omega
      of software development.

       But it CAN be much more friendly and/or
       tuned to a particular area of interest
       or preferred programming style.


    Iron Spring PL/I compiles directly to binary. It can produce assembler
    output, but only as a by-product of generating the object file. I have occasionally thought of trying to make it another front-end for GCC. As
    I understand it, GCC compiles to an intermediate language, not to C.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.linux.misc,alt.folklore.computers on Wed Jan 7 15:13:41 2026
    From Newsgroup: alt.folklore.computers

    In article <10jlqu8$mvh2$3@dont-email.me>,
    Peter Flass <Peter@Iron-Spring.com> wrote:
    On 1/6/26 14:24, c186282 wrote:
    On 1/6/26 07:16, Waldek Hebisch wrote:
    In alt.folklore.computers c186282 <c186282@nnada.net> wrote:
    <snip>
       Hmm ... look at all the GNU 'compilers' -
       FORTRAN, COBOL, Ada, 'D', M2, Rust,C++,
       G++, even Algol-68. None are 'compilers'
       per-se, but to-'C' TRANSLATORS. So, 'C',
       pretty much All Are One And One Is All.

    No.  Compiler as first stage translate given language to a
    common representation.  This representatiton is different
    than C.  Ada and GNU Pascal have parametrized types, there
    is nothing like that in C.  C++ (and some other languages)
    have exceptions, C do not have them.  There are several
    smaller things, for example Ada or Pascal modulo is different
    that C/Fortran modulo.  During optimization passes gcc
    keeps such information, to allow better optimization and
    error reporting.

    There were/are compilers that work by translating to C.  But
    this has limitations: generated code typically is worse because
    language specific information is lost in translation.  Error
    reporting is worse because translator is not doing as many
    analyzes as gcc do.  For those reasons compilers in gcc
    generate common representation which contains sum of features
    of all supported languages and not C.

      You give it a file in whatever lang, it produces
      a file in 'C' and compiles that. 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'.

      By 'compiler' I mean "source in -> (agitating sounds) ->
      binary executable out.

      I think there are still a few FORTRAN compilers out
      there for Linux, maybe COBOL too. There's at least
      one forth IDE/compiler. Digital Mars makes 'C' and
      'D' compilers. GCC is not the alpha and omega
      of software development.

       But it CAN be much more friendly and/or
       tuned to a particular area of interest
       or preferred programming style.


    Iron Spring PL/I compiles directly to binary. It can produce assembler >output, but only as a by-product of generating the object file. I have >occasionally thought of trying to make it another front-end for GCC. As
    I understand it, GCC compiles to an intermediate language, not to C.

    GCC's frontends, like those of most modern compilers, generate
    an intermediate representation (that is, indeed, not C). That,
    in turn, is optimized and presented to a backend, that uses the
    IR to generate machine code for a target instruction set. In
    this way, any of the languages that the GCC front-end recognize
    can be targetted to any of the architectures its backend
    supports.

    Whether that machine code is in binary object code or textual
    assembly code hardly matters; the hard work of the compiler is
    in the transation from source to machine code.

    Separate assembly and link stages are hidden by the compiler
    driver program (e.g., the `gcc` program itself), but don't
    change the fact that, yes, Virginia, GCC is actually a compiler.

    These bizarre definitional assertions about what makes something
    a "compiler" or not seem to be mostly put forth by people who
    have never heard of the concept of "separate compilation" or
    "libraries", let alone touched the innards of a compiler. In
    particular, this idea that everything must be implemented in a
    single program or it's not a "true" compiler is rooted firmly in
    ignorance.

    - Dan C.

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Peter Flass@Peter@Iron-Spring.com to comp.os.linux.misc,alt.folklore.computers on Wed Jan 7 12:20:54 2026
    From Newsgroup: alt.folklore.computers

    On 1/7/26 08:13, Dan Cross wrote:

    These bizarre definitional assertions about what makes something
    a "compiler" or not seem to be mostly put forth by people who
    have never heard of the concept of "separate compilation" or
    "libraries", let alone touched the innards of a compiler. In
    particular, this idea that everything must be implemented in a
    single program or it's not a "true" compiler is rooted firmly in
    ignorance.


    I think compilers have generated intermediate code since the first
    FORTRAN compiler. The only distinction is one vs. multiple programs. Wth
    a variety of both front- and back-ends GCC has good reason to separate
    them. On the other hand, a compiler that uses another compiled language
    as intermediate code is a strange beast, probably better called a
    translator.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From The Natural Philosopher@tnp@invalid.invalid to comp.os.linux.misc,alt.folklore.computers on Wed Jan 7 20:09:45 2026
    From Newsgroup: alt.folklore.computers

    On 07/01/2026 15:13, Dan Cross wrote:
    These bizarre definitional assertions about what makes something
    a "compiler" or not seem to be mostly put forth by people who
    have never heard of the concept of "separate compilation" or
    "libraries", let alone touched the innards of a compiler. In
    particular, this idea that everything must be implemented in a
    single program or it's not a "true" compiler is rooted firmly in
    ignorance.

    <applause>
    --
    Climate Change: Socialism wearing a lab coat.

    --- Synchronet 3.21b-Linux NewsLink 1.2