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.



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