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


On Sunday 03 April 2005 16:59, Ian Lance Taylor wrote:
> This patch changes the C frontend to generate SWITCH_EXPR rather than
> SWITCH_STMT.  SWITCH_EXPR is GENERIC, unlike SWITCH_STMT which is
> specific to the C/C++ frontends.  Generating SWITCH_EXPR directly
> saves a call to gimplify_switch_stmt for each switch statement.

It also makes changing the underlying data structures harder.  IIRC the
SWITCH_BODY of a SWITCH_EXPR is a list of CASE_LABEL_EXPRs, and the C
SWITCH_STMT_BODY is a STATEMENT_LIST.  So this would have to be changed
back again if (when) the statically typed 'tree' project starts.

Gr.
Steven


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