Skip to content

[basic.pre][basic.link] Directly associate linkage with names #8126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[basic.pre][basic.link] Names have linkage
An essential property of names is that they have linkage.
Move the statement that names have linkage up from [basic.link]
to [basic.pre] where the term `name` is defined, and before
the references to linkage of names in the clauses between
[basic.pre] and [basic.link].
  • Loading branch information
AlisdairM committed Jul 27, 2025
commit 523cd092ef2013c451b9686fe1cfc9d718ac804f
28 changes: 13 additions & 15 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
\grammarterm{conversion-function-id}\iref{class.conv.fct},
\grammarterm{operator-function-id}\iref{over.oper}, or
\grammarterm{literal-operator-id}\iref{over.literal}.
A name has
\defnadj{external}{linkage},
\defnadj{module}{linkage},
\defnadj{internal}{linkage}, or
\defnadj{no}{linkage},
as determined by the rules in \ref{basic.link}.

\pnum
Two names are \defnx{the same}{name!same} if
Expand Down Expand Up @@ -157,6 +163,12 @@
refer to the same entity in these translation units depending on the
linkage\iref{basic.link} of the name specified in each
translation unit.
\begin{note}
All declarations of an entity with a name with internal linkage
appear in the same translation unit.
All declarations of an entity with module linkage
are attached to the same module.
\end{note}

\rSec1[basic.def]{Declarations and definitions}

Expand Down Expand Up @@ -2875,6 +2887,7 @@

\pnum
\indextext{program}%
\indextext{translation unit}%
\indextext{linking}%
A \defn{program} consists of one or more translation units\iref{lex.separate}
linked together. A translation unit consists
Expand All @@ -2886,21 +2899,6 @@
\opt{global-module-fragment} module-declaration \opt{declaration-seq} \opt{private-module-fragment}
\end{bnf}

\pnum
\indextext{translation unit}%
A name has
\defnadj{external}{linkage},
\defnadj{module}{linkage},
\defnadj{internal}{linkage}, or
\defnadj{no}{linkage},
as determined by the rules below.
\begin{note}
All declarations of an entity with a name with internal linkage
appear in the same translation unit.
All declarations of an entity with module linkage
are attached to the same module.
\end{note}

\pnum
\indextext{linkage!\idxcode{static} and}%
\indextext{\idxcode{static}!linkage of}%
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy