[llvm-dev] What is the default linkage type?
Russell Wallace via llvm-dev
llvm-dev at lists.llvm.org
Wed Jan 12 20:18:17 PST 2022
According to https://llvm.org/docs/LangRef.html#linkage-types
> external
If none of the above identifiers are used, the global is externally
visible, meaning that it participates in linkage and can be used to resolve
external symbol references.
But that doesn't seem to be quite correct.
For a global variable, external linkage type seems to mean the same thing
as extern in C: this is /not/ a definition, but a mere declaration of
something that must be defined elsewhere.
But when a linkage type is not specified, the system doesn't seem to behave
that way; instead, such a global variable seems to be treated as a
definition.
Has the above paragraph in the documentation been superseded, or am I
misunderstanding it? What exactly is the default linkage type?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20220113/983ef0da/attachment.html>
More information about the llvm-dev
mailing list