How can I print the result of sizeof() at compile time in C?
For now I am using a static assert (home brewed based on other web resources) to compare the sizeof() re
I stumbled upon a solution similar to Bakhazard's great solution, and this one produces a much less verbose warning, so you may find it useful:
char (*__fail)(void)[sizeof(uint64_t)] = 1;
This produces the error message
Function cannot return array type 'char [8]'
This was tested with the latest version of clang(1).