From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7495 invoked by alias); 5 Apr 2012 09:18:19 -0000 Received: (qmail 7484 invoked by uid 22791); 5 Apr 2012 09:18:18 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Apr 2012 09:18:05 +0000 Received: by iaag37 with SMTP id g37so1596363iaa.20 for ; Thu, 05 Apr 2012 02:18:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.202.38 with SMTP id kf6mr1135577igc.30.1333617484968; Thu, 05 Apr 2012 02:18:04 -0700 (PDT) Received: by 10.42.228.200 with HTTP; Thu, 5 Apr 2012 02:18:04 -0700 (PDT) In-Reply-To: References: <4F7B356E.9080003@google.com> <4F7C35A3.3080207@codesourcery.com> Date: Thu, 05 Apr 2012 09:18:00 -0000 Message-ID: Subject: Re: Switching to C++ by default in 4.8 From: Richard Guenther To: Lawrence Crowl Cc: Bernd Schmidt , Gabriel Dos Reis , David Edelsohn , Diego Novillo , gcc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg00145.txt.bz2 On Wed, Apr 4, 2012 at 7:53 PM, Lawrence Crowl wrote: > On 4/4/12, Richard Guenther wrote: >> On Apr 4, 2012 Bernd Schmidt wrote: >> > On 04/04/2012 11:06 AM, Richard Guenther wrote: >> > > So - I'll veto the switch unless I see 1) and 2). =A01) and 2) >> > > can be combined by transitioning vec.h to a C++ template class, >> > > with proper GC support. =A0(not sure that I can veto anything >> > > - heh) >> > >> > I don't think I can veto anything, but I'll go on the record >> > again saying that I don't think this entire plan is a good >> > idea. Write a new project in C++? Absolutely. Convert a large >> > existing one to a different language? A huge waste of time that >> > will distract us for years from actual user-visible changes. >> >> I agree for the idea of converting all of GCC to C++ (whatever >> that means). =A0I disagree for the part making the internal >> infrastructure easier to use, understand and maintain. =A0Which >> means targeting mostly isolated sub-systems, like vec.h (and >> other various containers), double-int.[ch] (and other various >> way of representing and working with constants). =A0Making tree >> or gimple a C++ class with inheritance and whatever is indeed >> a huge waste of time and existing developer ressources (that, >> if only because they have to adapt and maintain two completely >> different code-bases over some time). > > Trees are presently a significant problem in that many static errors > become dynamic errors, which entails more debugging. How do you expect tree errors to become static? By using derived types everywhere? Note that this would only be possible in a _very_ limited sub-set of places. >> I expect the GCC core to maintain written in C, compiled by C++. > > Converting VECs to C++ vectors vector would provide significant code > clarity benefits. =A0The files in which that is done would necessarily > be C++ only. I already had VECs as the very first and best example why C++ might be good. >> > I also find debugging C++ in gdb somewhat more annoying than >> > debugging plain C, and at the moment I always go back to a >> > stage1 compiler. >> >> Indeed - I'd be worried if my debugging efficiency decreases by >> more than 5%. > > If the number of debugging sessions was reduced by the same amount, > the result would be a net wash. I have no expectation that the number of debug sessions will be reduced. Richard. > -- > Lawrence Crowl