This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.
> 
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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]