This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: C frontend: Generate SWITCH_EXPR rather than SWITCH_STMT
- From: Ian Lance Taylor <ian at airs dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 04 Apr 2005 21:22:32 -0400
- Subject: Re: PATCH RFA: C frontend: Generate SWITCH_EXPR rather than SWITCH_STMT
- References: <m38y3z6h4z.fsf@gossamer.airs.com><20050405004332.GE1328@redhat.com>
Richard Henderson <rth@redhat.com> writes:
> On Sun, Apr 03, 2005 at 10:59:08AM -0400, Ian Lance Taylor wrote:
> > It would also be possible to change the C++ frontend to no longer
> > generate these looping constructs, but to emit GENERIC directly.
> > However, my present understanding is that the C++ frontend maintainers
> > would prefer to continue to generate them. This is evidently not the
> > case for the C frontend, which stopped generating them via a patch by
> > RTH last June.
>
> Well, it turns out that we might have to revert some of that in
> order to properly handle OpenMP. But that's not relevant here.
I was planning to follow this patch with a patch to move several items
from c-common.def to cp/cp-tree.def: FOR_STMT, WHILE_STMT, DO_STMT,
BREAK_STMT, CONTINUE_STMT, SWITCH_STMT. I believe that these tree
codes are currently only generated by the C++ frontend. I conclude
from your comment that such a patch would not be appropriate. Is that
correct?
(My initial impetus for these patches came from looking for the code
which handled "break", finding various bits of codes to handle
BREAK_STMT, and then later discovering that those bits of codes were
not used by the C frontend at all.)
Ian