Menu

Typedef && ENUM

2021-05-28
2021-05-28
  • Chingson Chen

    Chingson Chen - 2021-05-28

    I found the "st_link" type-chain used in "symtab.h" has reserved "v_enum" in "const_val" field of the specifier. But seems it is not assigned (yet) in current version SDCC. BTW, I can not find the trace of "typedef" statements in the back-end either.
    Without those information, the code output is still correct. But when debugging , the corresponding "ENUM" item is not shown, and show memory that "casting" to the type that "typedef" defined is not available.

    The features above seems not important for DIY hobby users, However, it do matter in serious commercial/complex applications when debugging, I'll try to add those features in my own branch, but I'm afraid it will get harder to merge in the future.

     
    • Philipp Klaus Krause

      Unfortunately, I am not familiar with that part of SDCC, but:

      • C23 is likely to bring some changes in enums (the underlying integer type can be selected by the programmer), so we'll have to make changes in SDCC, too.
      • You might be wrong about the hobbyists. The retrogaming community does have some fancy debugging features in some of their emulators of game systems.
      • If you have improvements in your own branch / fork, you could open tickets in the patch tracker for individual improvements. Maybe some parts can make it into SDCC.
       

      Last edit: Philipp Klaus Krause 2021-05-29

Log in to post a comment.