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: PATCH RFA: C frontend: Generate SWITCH_EXPR rather than SWITCH_STMT


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


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