Skip to content

[2025-06 CWG Motion 2] Core Language Working Group "ready" Issues for the June, 2025 meeting #7984

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 3 commits 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
17 changes: 15 additions & 2 deletions source/preprocessor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@
semantics.

\pnum
If one of the \grammarterm{pp-tokens} of a \tcode{\#embed} directive
(before macro replacement) is the \grammarterm{identifier}
\tcode{limit}, \tcode{prefix}, \tcode{suffix}, or \tcode{if_empty}
and that \grammarterm{identifier} is defined
as a macro\iref{cpp.replace.general}, the program is ill-formed.
Any \grammarterm{embed-prefixed-parameter} is conditionally-supported,
with \impldef{supported forms of \#embed prefix parameters} semantics.

Expand Down Expand Up @@ -482,6 +487,7 @@
\tcode{assume} & \tcode{202207L} \\
\tcode{deprecated} & \tcode{201309L} \\
\tcode{fallthrough} & \tcode{201603L} \\
\tcode{indeterminate} & \tcode{202403L} \\
\tcode{likely} & \tcode{201803L} \\
\tcode{maybe_unused} & \tcode{201603L} \\
\tcode{no_unique_address} & \tcode{201803L} \\
Expand Down Expand Up @@ -525,6 +531,13 @@
\tcode{defined}
unary operator),
just as in normal text.
If replacement of macros in the preprocessing tokens following the sequence
\tcode{\xname{has_embed} (} and before a matching \tcode{)}
(possibly produced by macro expansion)
encounters a preprocessing token that is one of the \grammarterm{identifier}s
\tcode{limit}, \tcode{prefix}, \tcode{suffix}, or \tcode{if_empty}
and that \grammarterm{identifier} is defined
as a macro\iref{cpp.replace.general}, the program is ill-formed.
If the preprocessing token
\tcode{defined}
is generated as a result of this replacement process
Expand Down Expand Up @@ -910,12 +923,12 @@
\end{example}

\pnum
The \tcode{\#embed} directive is replaced by a comma-delimited list of integer
The \tcode{\#embed} directive is replaced by a comma-separated list of integer
literals of type \tcode{int}, unless otherwise modified by embed
parameters\iref{cpp.embed.param}.

\pnum
The integer literals in the comma-delimited list correspond to
The integer literals in the comma-separated list correspond to
resource-count consecutive calls to \tcode{std::fgetc} \iref{cstdio.syn}
from the resource, as a binary file.
If any call to \tcode{std::fgetc} returns \tcode{EOF}, the program is
Expand Down