From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10488 invoked by alias); 24 Jan 2020 16:34:40 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 10468 invoked by uid 89); 24 Jan 2020 16:34:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.9 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=hear, HX-HELO:sk:mail-ot X-HELO: mail-ot1-f50.google.com Received: from mail-ot1-f50.google.com (HELO mail-ot1-f50.google.com) (209.85.210.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Jan 2020 16:34:39 +0000 Received: by mail-ot1-f50.google.com with SMTP id 66so2155343otd.9 for ; Fri, 24 Jan 2020 08:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EE+a/f3oG3xvDz8bmjALj3ZqlNJzR0PP5NkP2MIjFSc=; b=XtJZR2YLM2NSBO8N2TZ+fhgXQqNOkduKfcslwP8NIyVjpqQHThEb4UcOUwdMwd15iF Bz/J3dhfn0z0smS0JWn962htvPSwtEn7ncgk/sFeByb7q7TuqDezrgyDqb72VYp6rAOS ry+Uk9GkPbcWOCw7LqOXPuLnJ6sCHXlZPlirmLPvhY5WjGEK/Np0+54Uo0jGtGWG6w+f Ij4jAIPZcxBWlsK7/KMHRvwVhrcRZ2MXI2b+76sw1Zw83IJQOOrm9hH8KC0RuO+/y9QE LgaCy+6/3UOJ3R0S7c+1qTzmISMZ4IGV/ZPclh3+qhDgFj29IvY+d2lNm65WctN6tKVc 34Rg== MIME-Version: 1.0 References: <20200124132004.GA7409@adacore.com> In-Reply-To: <20200124132004.GA7409@adacore.com> From: "Christian Biesinger via gdb" Reply-To: Christian Biesinger Date: Fri, 24 Jan 2020 16:34:00 -0000 Message-ID: Subject: Re: Allow C99/C11 in bfd? To: Joel Brobecker Cc: Nick Clifton , binutils@sourceware.org, gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00062.txt.bz2 On Fri, Jan 24, 2020 at 2:20 PM Joel Brobecker wrote: > > > > (I'm not even going to ask about C++, although I think that would be nice) > > > > Bah! Real programmers don't use C++! Just joking of course, > > but I seriously doubt that we will want to change the code base > > now. Speaking personally I am much more comfortable with C > > than with C++, but that is probably just me. > > The way the Pro C++ members of the GDB community approached the > suggestion was by building a case of what C++ would bring, > concretely, in terms of improvement. They also had a transition > plan. As someone who was _not_ in favor of the switch to C++, I had > to admit that the C++ proponents had some solid points and that > those against did not have a solid counter-argument. It took > a while, as a decision of this magnitude always takes, but > it helped us keep the discussions focused on factual technical > arguments. I thought that worked really way for the GDB group. > > Assuming the community is not refusing to even hear about the idea, > how things happened in GDB could be inspiration for how to at least > debate the merits of the change. OK. I'm definitely not ready right now to make a full case for switching to C++. Advantages, of course, include easier memory handling with smart pointers and easier string handling with std::string. > Note that the idea might be dead right off the bat if being > usable from C is an objective of the binutils project. For > a relatively low-level library like this one, I wouldn't personally > be surprised. Well, you could still use extern "C" for any entry points and still get a lot of advantages. Anyway, OK, since initial opinions on C99 sound promising I guess I'll send a patch to enable the C99 flag and see if anyone else has opinions. It does not look like autoconf has an easy way to enable C11?! Christian