Re: [C--] bool and bits1
Norman Ramsey <[email protected]> Sat, 21 Mar 2009 17:10:41 -0400
| Newsgroups | gmane.comp.lang.c-- |
|---|---|
| Message-ID | <[email protected]> |
> it's not possible to allocate temporary variables of bool to > simplify complicate predicate/logic expressions to three address > forms. If you are using C--, there is no reason for you to do so --- you would simply be duplicating the work of the C-- compiler. If your front end insists on simplifying boolean expressions, than your front end should compile them as lcc does, to conditional branches. > 1. Why there is no bool type in the C-- grammar, but the semantics of > C-- has bool type? allowing bool type would eliminate the above > redundant type conversions. > > 2. I guess most of the use of bits1 is like the above case. Any > exception? Why bool and bits1 are not equivalent types? bits1 is for values and bool is for control flow. They are handled differently in the back end. Norman _______________________________________________ Cminusminus mailing list [email protected] https://www.eecs.harvard.edu/mailman/listinfo/cminusminus