This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: Move tree codes used only by C++ frontend into cp/*
Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
> | There are several tree codes currently defined in the common C/C++
> | code which are only used by C++. These are the basic language
> | constructs, such as FOR_STMT, WHILE_STMT, etc. The C frontend now
> | simply generates GENERIC for these cases. The C++ frontend continues
> | to use these language specific codes.
>
> A meta question: Have we agreed that it is a wrong idea to unify the
> C and C++ front-ends, therefore either front-end is better developed
> independently?
As far as I can see, the only reasonable way to unify the front ends
would be to implement a C mode in the C++ front end. If somebody is
definitely going to do that on some sort of planned timeline, however
vague, then there is no point to doing clean-up work on the C
frontend. But I have not heard that. And of course Joseph Myers just
did quite a bit of work on the C frontend, by rewriting the parser.
My take on is is that I'm not sure what the advantage would be of
unifying the frontends. It seems to me that it could only slow down
the C compiler, albeit not very much, and there is still plenty of C
code out there.
Ian