4 ms·
I wrote this for students in CMU's operating systems course, to try to give them a few more useful "C tricks" but I thought it might be interesting to others.
by rpearl 15y ago
I wrote this for students in CMU's operating systems course, to try to give them a few more useful "C tricks" but I thought it might be interesting to others.
- mappu 15y agoWas there any rationale behind choosing C99 over C89? My university's microcontroller courses were all C89, which seems much more prevalent outside of GCC (in particular, Microsoft's C compiler). C89 might be seen as simpler and more bare-metal for an operating systems course owing to e.g. the inability to create runtime-sized arrays on the heap (despite the archaic refusal to accept variable declarations in for loops..).
- grok2 15y agoThe only problem that I have with code-generating macros like the FLAG_LIST is that source code browsing tools typically don't work in finding these symbols correctly and it gets frustrating over a large code base. You have to resort to full text grep to find these symbols that get generated via macros. So people getting into existing code always have a hard time.