Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: No more free JRE - Java is dead? Date: Thu, 28 Jun 2018 18:32:11 -0400 Organization: Aioe.org NNTP Server Lines: 40 Message-ID: References: <696cfc2e-c998-4cc7-99fa-f680f2c5baef@googlegroups.com> NNTP-Posting-Host: PBuS014lhzVyHjLbXmo/ZQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.3 Xref: csiph.com comp.lang.java.programmer:38450 On 6/28/2018 3:40 PM, Martin Gregorie wrote: > On Wed, 27 Jun 2018 20:14:50 -0400, Arne Vajhøj wrote: > >> On 6/27/2018 4:38 PM, Martin Gregorie wrote: >>> On Wed, 27 Jun 2018 12:24:29 -0700, Eric Douglas wrote: >>>> Is C++ platform independent? >>>> >>> It is to the extent that the GNU C compiler is portable because GNU C++ >>> is essentially just a preprocessor: it generates C, which is then fed >>> to the GNU G compiler to produce an executable. >> >> That was how the original C++ compiler cfront worked. >> >> I don't think GNU C++ (g++) works that way. >> > It seems to have changed again recently: currently it looks as though > there is one frontend for each language. All frontends produce the same > output (an intermediate language called GIMPLE) which is passed to the > optimiser and backend. The latter generates target-specific assembler, That is all within same executable. > However, its also possible I've misunderstood the setup because I found > the GNU documentation quite opaque and have basically ended up > summarising the Wikipedia "GNU Compiler Collection" page, so all > corrections greatfully received. Just use gcc -v and g++ -v and they reveal what they run. > The bottom line: to compile another language such as Java or COBOL yo > have to write a new front end, but are expected to reuse the optimiser > and backend as well as the target-specific assembler and linker. That is how compilers are done today and has been for many years. The distinct backend for each compiler is too expensive. Arne