This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Fixes to bootstrap from a C++ compiler (part 1)
- From: Daniel Jacobowitz <drow at false dot org>
- To: Bernardo Innocenti <bernie at develer dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 25 Jun 2004 00:27:27 -0400
- Subject: Re: [RFC] Fixes to bootstrap from a C++ compiler (part 1)
- References: <40DBA82F.50108@develer.com>
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