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?
I know that functions are tagged extern in C by default and it is
Share
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.