stdbool.h defines bool as __bit for the mcs51 and ds390 ports. However, this fails in situations where bool is completely legal but __bit is not. For example, the regression tests bug3565757 includes a bool member of a struct and current (rev #8095) fails to compile for mcs51/ds390 if the preprocessor check for __SDCC_WEIRD_BOOL is removed.
bool needs to exist as its own type rather than be conflated with the bit type.
Looks like a duplicate of #2933889 to me.
Philipp
I guess for the example I gave it's a duplicate, but #2933889 says it currently just applies to a bool in a struct. A pointer to bool and an array of bool should also work, but currently fails because pointers and arrays of bits are unsupportable on mcs51/ds390.
As of revision #9766, mcs51 should have full support for standard-compliant bool. But ds390 and xa51 do not yet.
Philipp
Fixed in revision #9795.
Philipp