From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2137 invoked by alias); 7 Mar 2003 23:05:30 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 2128 invoked from network); 7 Mar 2003 23:05:29 -0000 Received: from unknown (HELO nile.gnat.com) (205.232.38.5) by 172.16.49.205 with SMTP; 7 Mar 2003 23:05:29 -0000 Received: from gnat.com (darwin.gnat.com [205.232.38.44]) by nile.gnat.com (Postfix) with ESMTP id CC098F2DC0; Fri, 7 Mar 2003 18:05:27 -0500 (EST) Date: Fri, 07 Mar 2003 23:09:00 -0000 Subject: Re: Putting C++ code into gcc front end Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v551) Cc: neil@daikokuya.co.uk, per@bothner.com, tromey@redhat.com, gcc@gcc.gnu.org To: Geoff Keating From: Geert Bosch In-Reply-To: <200303072250.h27MoK706172@desire.geoffk.org> Message-Id: <4CC1276A-50F1-11D7-A6B8-00039344BF4A@gnat.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00545.txt.bz2 On Friday, Mar 7, 2003, at 17:50 America/New_York, Geoff Keating wrote: >> Every front end should have it's own representation, which should be >> lowered to something common like GIMPLE that is simple, well- >> documented, and yet expressive enough to be useful to everyone. I >> feel we can't make real progress any other way. Imagine how >> maintainable each front-end having its own high-level IR with real >> distinct C structs and unions would be. > > Well... When I tried to imagine, I started thinking "and, yes, we > could have completely different representations for exceptions and > structures and references and function calls between the C, C++, Ada, > and Java frontends" which didn't sound quite so great. > > After all, another project which is also a good idea > and not making much progress recently is to commonize > more of the C and C++ frontends. > > Maybe a better solution would be to document what the > tree structure is actually supposed to look like, > and then try to ensure that? Note that Ada already builds its own tree for a complete translation unit. As last action the root of this tree is passed to "Gigi", which is the code that converts the GNAT trees to GCC trees. However, even though this glue code is very local, it is quite complex, and separation still isn't quite complete. A better documented back end / front end interface would be a great step forward. -Geert