This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Putting C++ code into gcc front end
- From: Dale Johannesen <dalej at apple dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, Richard dot Earnshaw at arm dot com, Rupert Wood <me at rupey dot net>, gcc at gcc dot gnu dot org
- Date: Tue, 4 Mar 2003 09:54:57 -0800
- Subject: Re: Putting C++ code into gcc front end
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.