It is redundant, confusing and useless.
https://en.cppreference.com/w/cpp/language/storage_duration#external_linkage
It is redundant, confusing and useless.
https://en.cppreference.com/w/cpp/language/storage_duration#external_linkage
Concept ACK, it’s confusing for me at least. There are more of these, but when they are before constants, mutexes, and functions (e.g. not for language linking) it’s not clear to me when they are needed.
Light code review ACK fa4bbd306e1ca369d02eb864983fbb4d64b50ca9
https://en.cppreference.com/w/cpp/language/storage_duration#external_linkage
So basically: never use extern
for functions, as they have external linkage by default, only for variables? This keeps coming back so it would be good to write it down in the developer notes.
This keeps coming back so it would be good to write it down in the developer notes.
It seems all additions date back at least 5 years, so we didn’t have any issues with this recently. And it shouldn’t cause any harm. It is simply redundant. I’ll leave this as if for now, but I am happy to review a pull that adds this to the dev notes.
extern
keywords specify either (a) a variable with external linkage, or (b) a symbol with “C” language linkage.