From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18449 invoked by alias); 4 Mar 2003 18:37:07 -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 18405 invoked from network); 4 Mar 2003 18:36:55 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by 172.16.49.205 with SMTP; 4 Mar 2003 18:36:55 -0000 Received: by fw-cam.cambridge.arm.com; id SAA14025; Tue, 4 Mar 2003 18:36:54 GMT Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma013833; Tue, 4 Mar 03 18:36:35 GMT Received: from pc960.cambridge.arm.com (pc960.cambridge.arm.com [10.1.205.4]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id SAA09798; Tue, 4 Mar 2003 18:36:32 GMT Received: from pc960.cambridge.arm.com (rearnsha@localhost) by pc960.cambridge.arm.com (8.11.6/8.9.3) with ESMTP id h24IaY318542; Tue, 4 Mar 2003 18:36:35 GMT Message-Id: <200303041836.h24IaY318542@pc960.cambridge.arm.com> X-Authentication-Warning: pc960.cambridge.arm.com: rearnsha owned process doing -bs To: Dale Johannesen cc: Nathan Sidwell , Richard.Earnshaw@arm.com, Rupert Wood , gcc@gcc.gnu.org Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. Subject: Re: Putting C++ code into gcc front end In-reply-to: Your message of "Tue, 04 Mar 2003 09:54:57 PST." <6997EA81-4E6A-11D7-80F3-000393D76DAA@apple.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Mar 2003 19:25:00 -0000 From: Richard Earnshaw X-SW-Source: 2003-03/txt/msg00246.txt.bz2 > > On Tuesday, March 4, 2003, at 04:45 AM, Nathan Sidwell wrote: > > Richard Earnshaw wrote: > > > >> Could the C++ front end be modified to make it compilable with any C > >> compiler (ignoring for the moment that parts of the C++ front end are > >> now written in ISO c90). That is, how many gnu extensions are used, > >> and can they be easily removed? > > a quick compile with -pedantic shows, > > char bitfields such as > > 1 cp-tree.h: unsigned char is_lang_type_class : 1;. Making this an int > > would > > enlarge that structure. > > 2 the tree checking stuff uses '({ ...})', but only when compiled with > > GCC > > 3 decl.c: (cond_expr) = value > > this hides inside things like 'current_binding_level = newlevel;' > > 4 some minor syntactic things that have crept in (extra ',', ';') > > If you really want to be compliant, all external names have to be unique > within 6 characters, case-insensitive (3.1.2). Somehow I doubt that's > going to happen. > Here's something frightening: nm -Pg cc1|awk '{ print $1 }'|sort|sed -e 's/^\(......\).*$/\1/'>/tmp/out uniq /tmp/out > /tmp/out2 wc -l /tmp/out* 3771 /tmp/out 1449 /tmp/out2 ie more than 1/2 of global symbols in the cc1 compiler are not unique in the first 6 characters. R.