home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.linux.misc      Linux-specific topics not covered by oth      135,536 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 134,466 of 135,536   
   Waldek Hebisch to c186282@nnada.net   
   Re: Naughty =?UTF-8?Q?C=E2=99=AF?=   
   06 Jan 26 23:10:06   
   
   XPost: alt.folklore.computers   
   From: antispam@fricas.org   
      
   In alt.folklore.computers c186282  wrote:   
   > On 1/6/26 07:16, Waldek Hebisch wrote:   
   >> In alt.folklore.computers c186282  wrote:   
   >>    
   >>>    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, 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   
      
   AFAIK you can remove C compiler binary and other compilers in   
   gcc will still work.   
      
   > 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.   
      
   >   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.   
   >   
      
   --   
                                 Waldek Hebisch   
      
   --- 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