Menu

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

closed-fixed
MCS51
5
2016-11-03
2012-09-10
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.

Related

Bugs: #1602

Discussion

  • Philipp Klaus Krause

    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
     
  • Philipp Klaus Krause

    As of revision #9766, mcs51 should have full support for standard-compliant bool. But ds390 and xa51 do not yet.

    Philipp

     
  • Philipp Klaus Krause

    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    Fixed in revision #9795.

    Philipp

     

Log in to post a comment.

Monday.com Logo