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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
Unfortunately, I am not familiar with that part of SDCC, but:
Last edit: Philipp Klaus Krause 2021-05-29