GCC and Clang seems unhappy with casting a pointer directly to a 16 or 32 bit number. "cast from pointer to smaller type 'u32' (aka 'unsigned int') loses information".
This needs to be addressed in three places:
ParseMember in simple_preprocessor.cpp
1 | printf(" {%s, MetaType_%.*s, \"%.*s\", (u32)&((%.*s *)0)->%.*s},\n", |
GetOrCreateDebugViewFor in handmade_debug.cpp
1 | u32 HashIndex = (((u32)ID.Value[0] >> 2) + ((u32)ID.Value[1] >> 2)) % ArrayCount(DebugState->ViewHash); |
CollateDebugRecords in handmade_debug.cpp
1 | Region->ColorIndex = (u16)OpeningEvent→BlockName; |
This issue can be solved by casting to memory_index aka size_t before casting to u32/u16.
There is some leftover copy/pasta in handmade_platform.h. "extra tokens at end of #endif directive"
1 | #endif debug_table * |
There is an empty method in handmade_debug.cpp. "control reaches end of non-void function"
1 2 3 4 | inline rectangle2 PlaceRectangle(layout *Layout, v2 Dim) { } |
_snprintf_s is not supported and needs to be replaced. This will be solved once the dependency to stdio is removed which Casey hopefully will do soon.
/Kim