On Thu, Oct 20, 2016 at 12:50 AM, Eric Botcazou <ebotca...@adacore.com> wrote: >> Because BOOLEAN_TYPE types only have two values as documented in >> tree.def: >> >> /* Boolean type (true or false are the only values). Looks like an >> INTEGRAL_TYPE. */ >> DEFTREECODE (BOOLEAN_TYPE, "boolean_type", tcc_type, 0) > > Yes, but on the other hand they have a precision and a range. > >> There are not many references to BOOLEAN_TYPE in ada/gcc-interface >> thus it shouldn't be hard to change ... (looks like Ada might even prefer >> ENUMERAL_TYPE here). > > It was like that originally (an ENUMERAL_TYPE) but this blocked LTO (well, > cross-language LTO) exactly like the sizetype discrepancy, so I don't really > feel like going back in time.
Because boolean_type_node was different? Well, are really _all_ boolean types this way or can you keep using BOOLEAN_TYPE for boolean_type_node for things like interfacing to C and C++ (and the builtins, etc.) and use ENUMERAL_TYPE for the cases where bool can have non zero/one values? Richard. > -- > Eric Botcazou