This is the mail archive of the gcc@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: [RFC] A new data structure for SWITCH_EXPR


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



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