Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2085 mcs51/ds390 bool fails when bit type is not allowed

open
nobody
MCS51
5
2015-03-25
2012-09-10
Erik Petrich
No

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.

Discussion

  • Looks like a duplicate of #2933889 to me.

    Philipp

     
  • Erik Petrich
    Erik Petrich
    2012-09-16

    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.

     
  • Ben Shi
    Ben Shi
    2015-03-25

    • Category: --> MCS51