September 2025
Intermediate to advanced
552 pages
14h 5m
English
We have encountered function-like macros explicitly (see subsection 10.2.1) and implicitly. Some interfaces in the C standard library are typically implemented by using them, such as the type-generic interfaces in <tgmath.h>. We also have seen that function-like macros can easily obfuscate our code and require a certain restrictive set of rules. The easiest strategy to avoid many of the problems that come with function-like macros is to use them only where they are irreplaceable, and use appropriate means where they are replaceable.
Read now
Unlock full access