Closed pinterior closed 4 years ago
Seriously? It looks to be an issue of clang as you mention. Actually I want to make townsdef.h eventually available to High-C by cplusplus macro so that towns-app sources can directly include this header in place for vmif.h. So, I want to avoid strongly-typed enum if possible. Are you able to get away from the errors if you use #define instead of enum?
By the way, I was not aware that stdint.h was in C99 standard. I thought I saw many open-source projects suffering from uintXX_t issues (multiple depending libraries declare own uintXX_t types) long after 2004, but apparently stdint.h existed after 2004. Replacing everything all at once will most likely will cause a disaster, but I'll gradually replace long long int to int64_t. Thanks!
Thanks! I take it.
#define TOWNSADDR_VRAM0_BASE 0x80000000
works fine with clang-cl.
On the other hand with C compiler, I think it's also safer to use #define
because enum signedness is implementation-defined.
(I cannot check High C behavior at this time, but HC17UM.DOC 8.5 does not mention on unsigned types.)
Workaround for errors caused by clang-cl bug(?)
I prefer integral types from
<cstdint>
, but respect current coding style.