Skip to content

[lex.separate] Redistribute second comment #7351

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
24 changes: 11 additions & 13 deletions source/lex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,8 @@
called a \defnadj{preprocessing}{translation unit}.
\begin{note}
A \Cpp{} program need not all be translated at the same time.
\end{note}

\pnum
\begin{note}
Previously translated translation units and instantiation
units can be preserved individually or in libraries. The separate
translation units of a program communicate\iref{basic.link} by (for
example)
calls to functions whose identifiers have external or module linkage,
manipulation of objects whose identifiers have external or module linkage, or
manipulation of data files. Translation units can be separately
translated and then later linked to produce an executable
program\iref{basic.link}.
Translation units can be separately translated and then later linked to
produce an executable program\iref{basic.link}.
Comment on lines +42 to +43
Copy link
Member

@Eisenwave Eisenwave Oct 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Translation units can be separately translated and then later linked to
produce an executable program\iref{basic.link}.
Translation units can be separately translated and then linked together to
produce a program\iref{basic.link}.

This change would bring the note more in line with the choice of words in https://eel.is/c++draft/basic.link#1

I also find "and then later" to be a bit redundant; just "and then" or "and later" would suffice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I was deliberately restricting myself to moving approved words around.

I have no objections to further refining the existing text, but would rather do that as a follow-up once the text is in its new place.

Copy link
Contributor Author

@AlisdairM AlisdairM Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, my own rewording would be more like:
"Source files can be separately translated to produce translation units and instantiation units that are later linked to create an executable program."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side note: Of course, "instantiation units" no longer exist, really, given that we (must) have interleaved instantiation and constant evaluation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we still OK with this move then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should we wait for Reflection to land first?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would have made a good addition for N5001, so that the reflection folks could have had this slightly cleaner base to work from. As it missed P5001, I suggest we refer the authors of P2996 to look at this and pick up anything they find useful.

\end{note}
\indextext{compilation!separate|)}

Expand Down Expand Up @@ -240,6 +229,15 @@
\end{note}
The
program is ill-formed if any instantiation fails.
\begin{note}
Previously translated translation units and instantiation
units can be preserved individually or in libraries. The separate
translation units of a program communicate\iref{basic.link} by (for
example)
calls to functions whose identifiers have external or module linkage,
manipulation of objects whose identifiers have external or module linkage, or
manipulation of data files.
\end{note}

\item All external entity references are resolved. Library
components are linked to satisfy external references to
Expand Down
Loading