I know that functions are tagged extern
in C by default and it is also possible to use an extern
variable in C (if it is initialized in some other file or if I write extern int foo = 1;
). But can I use extern
for a C macro because they behave like functions?
Unless something radically changed in C99, preprocessor macros don't have storage classes. You can't declare them without simultaneously defining them. They aren't even treated by the compiler in the same way that other identifiers are treated -- they're a purely textual translation that (at least conceptually) happens even before the compiler attempts any kind of name lookup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With