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: Richard Earnshaw <rearnsha at arm dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: Richard dot Earnshaw at arm dot com, Rupert Wood <me at rupey dot net>, gcc at gcc dot gnu dot org
- Date: Tue, 04 Mar 2003 14:00:59 +0000
- Subject: Re: Putting C++ code into gcc front end
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> 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.
The comment preceding lang_type_header already indicates that some of the
bits there logically belong in lang_type_class. And a quick look through
the header suggests that only one use really relies on this being an
eight-bit field and that is lang_type_class: the other two uses are 1) a
Union 2) lang_type_ptrmem (where it is already followed by a 32-bit
aligned object.
So if we made this a bitfield of an int, we could push up to 32-bits worth
of things into lang_type_header and the cost would be zero.
R.