Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Understandability |
| Date | 2015-05-04 09:15 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <mi769d$ip9$1@dont-email.me> (permalink) |
| References | <f088f6c5-01bd-44ca-b51a-04e71d1bd169@googlegroups.com> <WWW-20150502040535@ram.dialup.fu-berlin.de> <mi2fei$75j$2@dont-email.me> <ddd5d238-7d70-4b42-a6f9-c449ea163c27@googlegroups.com> |
On 02/05/15 18:13, David Kleinecke wrote: > On Saturday, May 2, 2015 at 5:21:48 AM UTC-7, Noob wrote: >> On 02/05/2015 04:05, Stefan Ram wrote: >> >>> Then restrict your search to wikipedia. >> >> Indeed! >> >> https://en.wikipedia.org/wiki/GNU_Compiler_Collection >> >>> The GNU Compiler Collection (GCC) is a compiler system produced by >>> the GNU Project supporting various programming languages. GCC is a >>> key component of the GNU toolchain. >> >> https://en.wikipedia.org/wiki/Compiler >> >>> A compiler is a computer program (or set of programs) that transforms >>> source code written in a programming language (the source language) >>> into another computer language (the target language, often having a >>> binary form known as object code). The most common reason for >>> converting a source code is to create an executable program. >> >> Regards. > > The Wikipedia page on "GNU Compiler Collection" is very poorly written > and is an excellent example of what I deplore. Feel free to read it anyway - it's better than guessing about it. > > The definition on the "Compiler" is an excellent example of what I want. > A description of gcc might well start with that definition (edited > perhaps), then follow up: > The program gcc is a compiler for programs written in C programming > language. The C language is described in ... > But gcc is not a "compiler for programs written in C" - it is a compiler for a variety of languages (C, C++, java, go, fortran, Ada - IIRC), a run-time library (/not/ the standard C library, but the compiler support library), and a driver program that will also invoke assemblers and linkers as needed. > Gnu is right to call their work a collection. It is really a fiction > that gcc is a free-standing program. Gnu call it a "compiler collection" because it is a collection of compilers for different languages. No one has ever thought of it as a free-standing program, even when it was a pure C compiler - compilers are very rarely single programs. The program "gcc" itself is not even the compiler - it is a "driver" program that passes data and options around amongst the various parts of the suite to handle compilation and (usually) assembly and linking. > There are two parts - the front > and back ends. Three parts - there is also the "middle end". (And the assembler and linker come in addition - they are normally from binutils rather than gcc.) > The front end produces a "source program" in an > intermediate language which the back end "assembles" into machine code. Nope. The "front end" is specific to the source code language, such as C, C++, Fortran, etc. It produces an intermediate language (GIMPLE), which is passed on to the "middle end" where much of the optimisation work takes place. The middle-end is /mostly/ independent of both the back-end target and the front-end language, but there is a certain amount of cross-talk between the parts. (llvm has a similar theoretical structure, but has much cleaner separation between the parts.). The output from the middle-end is another intermediate language (RTL). The back-end handles the target-specific register allocation and code generation. The result is assembly, not machine code - an external assembler (usually "gas" from binutils) is called to generate the machine code. Then another external program (usually "ln" from binutils) is called to link the object code and static libraries into an executable. (Things are a little more complicated when using link-time optimisation, but lets skip that for now.) > GNU, I believe, uses a Lisplike language called RTL. One way to make > gcc a true program would be to make the back end a subroutine called at > the end of front processing. A pipe might be a better idea. > Pipes /are/ the usual way of passing data and options between the passes inside gcc. Intermediary files are only stored if you ask for them (typically for debugging gcc itself).
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-01 17:55 -0700
Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-01 19:41 -0700
Re: Understandability wssimms@gmail.com - 2015-05-01 20:45 -0700
Re: Understandability Bartc <bc@freeuk.com> - 2015-05-02 10:38 +0100
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-02 09:15 -0700
Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-04 09:26 +0200
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-04 12:52 -0700
Re: Understandability Noob <root@127.0.0.1> - 2015-05-02 14:21 +0200
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-02 09:13 -0700
Re: Understandability Ian Collins <ian-news@hotmail.com> - 2015-05-03 08:07 +1200
Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-02 13:11 -0700
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-03 10:50 -0700
Re: Understandability Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-03 13:26 -0700
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-04 12:29 -0700
Re: Understandability Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-05 05:47 -0700
Re: Understandability raltbos@xs4all.nl (Richard Bos) - 2015-05-08 21:10 +0000
Re: Understandability Ian Collins <ian-news@hotmail.com> - 2015-05-09 09:17 +1200
Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-08 14:32 -0700
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-09 09:13 -0700
Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-09 16:48 -0700
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-10 11:05 -0700
Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-11 08:48 +0200
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-11 09:55 -0700
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-11 17:52 -0400
Re: Understandability glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-05-11 22:54 +0000
Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-12 08:49 +0200
Re: Understandability Morris Dovey <mrdovey@iedu.com> - 2015-05-12 02:15 -0500
Re: Understandability Phil Carmody <pc+usenet@asdf.org> - 2015-05-25 03:15 +0300
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-25 00:45 -0400
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-25 10:26 -0700
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-11 10:06 -0700
Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-12 08:59 +0200
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-12 08:37 -0700
Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-13 08:53 +0200
Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-13 08:16 -0700
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-13 09:49 -0700
Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-13 10:53 -0700
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-14 10:35 -0700
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-13 09:31 -0700
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-13 13:10 -0400
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-14 10:27 -0700
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-14 22:51 -0400
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-15 10:02 -0700
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-15 13:37 -0400
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-16 09:18 -0700
Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-16 23:56 +0200
Re: Understandability gazelle@shell.xmission.com (Kenny McCormack) - 2015-05-17 12:45 +0000
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-17 09:16 -0700
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-17 12:47 -0400
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-18 10:54 -0700
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-18 15:00 -0400
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-19 09:49 -0700
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-19 13:10 -0400
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-16 19:01 -0400
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-17 09:30 -0700
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-17 12:58 -0400
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-18 10:54 -0700
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-18 14:56 -0400
Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-19 09:46 -0700
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-19 13:16 -0400
Re: Understandability Richard Heathfield <rjh@cpax.org.uk> - 2015-05-19 18:23 +0100
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-19 14:02 -0400
Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-19 00:11 +0200
Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-18 18:28 -0400
Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-15 10:52 -0700
Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-13 21:53 +0200
Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-09 16:18 +0200
Re: Understandability Noob <root@127.0.0.1> - 2015-05-09 18:31 +0200
Re: Understandability raltbos@xs4all.nl (Richard Bos) - 2015-05-17 10:44 +0000
Re: Understandability glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-05-17 15:53 +0000
Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-04 09:15 +0200
Re: Understandability Waldek Hebisch <hebisch@math.uni.wroc.pl> - 2015-05-16 00:28 +0000
Re: Understandability Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-03 10:58 -0700
csiph-web