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: Steven Bosscher <stevenb at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Ian Lance Taylor <ian at airs dot com>
- Date: Sun, 3 Apr 2005 17:38:45 +0200
- Subject: Re: PATCH RFA: C frontend: Generate SWITCH_EXPR rather than SWITCH_STMT
- Organization: SUSE Labs
- References: <m38y3z6h4z.fsf@gossamer.airs.com>
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