4 ms·
It's actually quite messy for C as well. I guess I should qualify that: it's messy for C as used in practice as well. #pragma weak, asm labels, always_inline,
by cokernel_hacker 11y ago
It's actually quite messy for C as well. I guess I should qualify that: it's messy for C as used in practice as well.
#pragma weak, asm labels, always_inline, debug information, attribute regparm, inline assembly, etc...
All of this is doable via incremental lowering from the AST (this is how clang does it) but it is fairly painful.
Even the relatively banal:
enum e;
void (*fp)(enum e);
enum e { v = 1ULL << 32 };
results in quite a bit of gymnastics! (https://github.com/llvm-mirror/clang/blob/202433cccd87a4e7d1e277f80be6b179165bcb8d/lib/CodeGen/CodeGenTypes.cpp#L237 https://github.com/llvm-mirror/clang/blob/202433cccd87a4e7d1...)