Re: [C--] qc-- fails to compile switch statement
Ning Wang <[email protected]> Sun, 22 Mar 2009 11:31:45 -0700
| Newsgroups | gmane.comp.lang.c-- |
|---|---|
| Message-ID | <[email protected]> |
Norman Ramsey wrote: > > If a front-ends knows some values in this set of unused range values is > > infeasible, then it can list only the feasible unused range values for the > > default. This might result in more efficient translation. > > If a front end knows some values are infeasible, they should be listed > on the switch statement as a whole, *not* on the default case. > > > But I believe in most cases front-ends cannot derive which values are > > infeasible at runtime, so (*) will provide a convenience to front-end > > writers as they only need to assert the range limits of switch statement > > expressions. > > We've added convenience features to C-- in the past, but only under > where the cost/benefit ratio overwhelmingly favorable. That's why we > abandoned declaration before us, and that's why we believe the span > mechanism should be improved. But the benefit of making switch > statements more convenient is not worth the cost. I want to say the design of C-- is nearly perfect for my purpose. Improved span is certainly a great thing. However, features like default case and bool registers are small but have more exposures to the beginning users of C--. > The language > manual is already too large and too difficult to understand. > My experience is that the manual is very well written and easy to understand. The difficulty of adopting C-- as a back end is not because of the documentation, but because of lacking some convenient high level constructs. Great efforts are needed to compile high-level constructs to C-- constructs, sometimes the efforts are no less than just generating assembly code. Luckily, these low-level constructs are exactly what I want, Ning _______________________________________________ Cminusminus mailing list [email protected] https://www.eecs.harvard.edu/mailman/listinfo/cminusminus