This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] A new data structure for SWITCH_EXPR
- From: Steven Bosscher <stevenb at suse dot de>
- To: Zack Weinberg <zack at codesourcery dot com>, Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc at gcc dot gnu dot org, law at redhat dot com
- Date: Mon, 8 Nov 2004 08:07:39 +0100
- Subject: Re: [RFC] A new data structure for SWITCH_EXPR
- Organization: SUSE Labs
- References: <20041107.235627.68036011.kazu@cs.umass.edu> <87zn1sapm2.fsf@codesourcery.com>
On Monday 08 November 2004 06:15, Zack Weinberg wrote:
> First, I'd like to point out that use of the "case A ... B:" feature
> is extremely rare, at least when it's via the GNU extension to C.
> Perhaps other languages use it more frequently.
Yup. It is very common in Fortran, for example.
> As such, it might
> make sense to drop CASE_HIGH entirely, having front ends break up A
> ... B into individual CASE_LABEL_NODEs for all the values in the
> range. Ranges would get more expensive, but each individual case
> would get cheaper.
How so? We now bundle consecutive individual cases that go to the same
case label in case ranges. This is extremely common in non-GNU C, think
about regular expressions for example.
Dropping CASE_HIGH is a bad idea IMHO.
Gr.
Steven