This is the mail archive of the gcc-patches@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: [RFC] Fixes to bootstrap from a C++ compiler (part 1)


On Fri, Jun 25, 2004 at 06:21:03AM +0200, Bernardo Innocenti wrote:
> Hello,
> 
> I was wondering how much work a full conversion of GCC's
> codebase to C++ would be, so I tried building with CC=g++
> and fixed the first few errors along the way.
> 
> These changes brings GCC a little closer to build with a C++
> compiler, while retaining full C89 compatibility.  It mostly
> adds casts for void* conversions and renames a few variables
> named after C++ keywords or existing type names.
> 
> Whatever the SC decision will be, these changes are either
> harmless or even healty to our codebase, so I'd like to
> commit them anyway.  If this is acceptable, I'll keep going
> with more patches of this kind.
> 
> Bootstrapped on i686-pc-linux-gnu with all languages enabled.

Personally, I think it's a good idea - but you've got some whitspace
issues in this patch.

> +  struct md_constant *def = (struct md_constant *)*slot;

I believe convention calls for a space after the closing paren.

> -  for (typestart = yytext + strlen (" typedef "); 
> +  for (typestart = yytext + strlen (" typedef ");

It looks like you're pruning trailing whitespace; please do that
separately.  I think your mailer also mangled indentation in a couple
of places.

-- 
Daniel Jacobowitz


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