From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20416 invoked by alias); 2 Aug 2003 01:11:31 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20344 invoked from network); 2 Aug 2003 01:11:30 -0000 Received: from unknown (HELO concert.shout.net) (204.253.184.25) by sources.redhat.com with SMTP; 2 Aug 2003 01:11:30 -0000 Received: from duracef.shout.net (duracef.shout.net [204.253.184.12]) by concert.shout.net (8.12.9/8.12.9) with ESMTP id h721BTSE017372; Fri, 1 Aug 2003 20:11:29 -0500 Received: from duracef.shout.net (localhost [127.0.0.1]) by duracef.shout.net (8.12.9/8.12.9) with ESMTP id h721BTHK021441; Fri, 1 Aug 2003 20:11:29 -0500 Received: (from mec@localhost) by duracef.shout.net (8.12.9/8.12.9/Submit) id h721BTwe021440; Fri, 1 Aug 2003 21:11:29 -0400 Date: Sat, 02 Aug 2003 01:11:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200308020111.h721BTwe021440@duracef.shout.net> To: ac131313@redhat.com, gdb@sources.redhat.com Subject: Re: Allow C++ or C99 in sim/*? X-SW-Source: 2003-08/txt/msg00031.txt.bz2 Not like I work in sim/ anyways ... so all this is from the peanut gallery. I like C++ more than C99. If we go with C99, and actually start using C99 features, we'll get unhappy users who still have C90 compilers. And if we tell them "just use gcc" (which I think is a valid response) then we might as well go all the way to C++. My experience with C++ is that it makes some maintenance tasks easier. If there is a crappy class, it's easier to rip out / rewrite a class in C++ than it is to do the equivalent in C. We would get massive dogfood benefits from writing in C++. That would be the major benefit. For a C++ coding standard, there are several views. The official Bjarne Stroustrup view is to use the whole freakin' language because every feature in the language is there for a good reason. For the purpose of eating dogfood, that is a reasonable thing. My personal view is that I stay away from templates and rtti because they require link time support, thus are less portable. Also I stay away from namespaces because they confuse gdb. That would be a reason *for* using namespaces for us! And I eschew exceptions because I don't like the way they were glommed onto the language as an afterthought. gcc 2.95.3 has a usable C++ compiler, although it's incomplete in many areas. Michael C