Discussion about this post

User's avatar
Kevin Broadey's avatar

You’re forgetting the bigger problem: without the cast to u32, a<<16 is UNDEFINED on a 16-bit CPU. But, sure, function-like macros are PURE EVIL because they do zero type-checking on their arguments.

Expand full comment
Magnus Møller Jørgensen's avatar

These macro's could perhaps be in their own header files.

But i'd like to ask. Why even have a macro for lower_16_bits?

Expand full comment
6 more comments...

No posts