Skip to content
Draft
Show file tree
Hide file tree
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
16 changes: 9 additions & 7 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3076,7 +3076,8 @@
\pnum
If two declarations of an entity are
attached to different modules, the program is ill-formed;
no diagnostic is required if neither is reachable from the other.
no diagnostic is required
if neither is reachable from the other\ifndrdef{basic.link.entity.same.module}.
\begin{example}
\begin{codeblocktu}{\tcode{"decls.h"}}
int f(); // \#1, attached to the global module
Expand Down Expand Up @@ -3142,7 +3143,8 @@
declarations for an array
object can specify array types that differ by the presence or absence of
a major array bound\iref{dcl.array}.
No diagnostic is required if neither declaration is reachable from the other.
No diagnostic is required
if neither declaration is reachable from the other\ifndrdef{basic.link.consistent.types}.
\begin{example}
\begin{codeblock}
int f(int x, int x); // error: different entities for \tcode{x}
Expand Down Expand Up @@ -3769,7 +3771,7 @@
using the alignment specifier\iref{dcl.align}.
Attempting to create an object\iref{intro.object} in storage that
does not meet the alignment requirements of the object's type
is undefined behavior.\ubdef{basic.align.object.alignment}
is undefined behavior\ubdef{basic.align.object.alignment}.

\pnum
A \defnadj{fundamental}{alignment} is represented by an alignment
Expand Down Expand Up @@ -4514,7 +4516,7 @@
\tcode{p0} represents the address of a block of storage disjoint from the storage
for any other object accessible to the caller.
The effect of indirecting through a pointer
returned from a request for zero size is undefined.\ubdef{basic.stc.alloc.zero.dereference}
returned from a request for zero size is undefined\ubdef{basic.stc.alloc.zero.dereference}.
\begin{footnote}
The intent is
to have \tcode{\keyword{operator} \keyword{new}()} implementable by
Expand Down Expand Up @@ -4637,7 +4639,7 @@
signature.

\pnum
If a deallocation function terminates by throwing an exception, the behavior is undefined.\ubdef{basic.stc.alloc.dealloc.throw}
If a deallocation function terminates by throwing an exception, the behavior is undefined\ubdef{basic.stc.alloc.dealloc.throw}.
The value of the first argument supplied to a deallocation function may
be a null pointer value; if so, and if the deallocation function is one
supplied in the standard library, the call has no effect.
Expand Down Expand Up @@ -7695,7 +7697,7 @@
An invocation of the macro \tcode{va_start}\iref{cstdarg.syn}
shall not be a subexpression
of the predicate of a contract assertion,
no diagnostic required.
no diagnostic required\ifndrdef{basic.contract.vastart.contract.predicate}.

\pnum
\begin{note}
Expand Down Expand Up @@ -8101,6 +8103,6 @@
If the contract-violation handler
is not replaceable,
a declaration of a replacement function for the contract-violation handler
is ill-formed, no diagnostic required.
is ill-formed, no diagnostic required.\ifndrdef{basic.contract.handler.replacing.nonreplaceable}

\indextext{contract assertion|)}
20 changes: 11 additions & 9 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@
If the specifier is applied to any declaration of a variable,
it shall be applied to the initializing declaration.
No diagnostic is required if no \keyword{constinit} declaration
is reachable at the point of the initializing declaration.
is reachable at the point of the initializing declaration\ifndrdef{dcl.constinit.specifier.not.reachable}.

\pnum
If a variable declared with the \keyword{constinit} specifier has
Expand Down Expand Up @@ -1139,7 +1139,7 @@
is declared inline in one definition domain,
an inline declaration of it shall be reachable
from the end of every definition domain in which it is declared;
no diagnostic is required.
no diagnostic is required\ifndrdef{dcl.inline.missing.on.definition}.
\begin{note}
A call to an inline function or a use of an inline variable can be encountered
before its definition becomes reachable in a translation unit.
Expand Down Expand Up @@ -3274,7 +3274,7 @@
the converted initializer is a glvalue whose
type is not call-compatible\iref{expr.call}
with the type of the function's definition
results in undefined behavior.\ubdef{dcl.ref.incompatible.function}
results in undefined behavior\ubdef{dcl.ref.incompatible.function}.
Attempting to bind a reference to an object where
the converted initializer is a glvalue through which
the object is not type-accessible\iref{basic.lval}
Expand All @@ -3292,7 +3292,7 @@
\end{note}
The behavior of an evaluation of a reference\iref{expr.prim.id, expr.ref} that
does not happen after\iref{intro.races} the initialization of the reference
is undefined.\ubdef{dcl.ref.uninitialized.reference}
is undefined\ubdef{dcl.ref.uninitialized.reference}.
\begin{example}
\begin{codeblock}
int &f(int&);
Expand Down Expand Up @@ -4364,7 +4364,8 @@
\end{example}
For a given inline function defined in different translation units,
the accumulated sets of default arguments at the end of the
translation units shall be the same; no diagnostic is required.
translation units shall be the same;
no diagnostic is required\ifndrdef{dcl.fct.default.inline.same.defaults}.
If a friend declaration $D$ specifies a default argument expression,
that declaration shall be a definition and there shall be no other
declaration of the function or function template
Expand Down Expand Up @@ -4669,7 +4670,8 @@
a declaration $F_2$ is a
first declaration of \tcode{f} in another translation unit,
$F_1$ and $F_2$ shall specify the same
\grammarterm{function-contract-specifier-seq}, no diagnostic required.
\grammarterm{function-contract-specifier-seq},
no diagnostic required\ifndrdef{dcl.contract.func.mismatched.contract.specifiers}.

\pnum
A \grammarterm{function-contract-specifier-seq} $S_1$
Expand Down Expand Up @@ -7578,7 +7580,7 @@
shall be such that it would be valid as a redeclaration
of the declaration in that header;
\end{itemize}
no diagnostic is required.
no diagnostic is required\ifndrdef{dcl.fct.def.replace.bad.replacement}.
\begin{note}
The one-definition rule\iref{basic.def.odr}
applies to the definitions of a replaceable function
Expand Down Expand Up @@ -9299,7 +9301,7 @@
\pnum
If two declarations of an entity give it different language linkages, the
program is ill-formed; no diagnostic is required if neither declaration
is reachable from the other.
is reachable from the other\ifndrdef{dcl.link.mismatched.language.linkage}.
\indextext{consistency!linkage specification}%
A redeclaration of an entity without a linkage specification
inherits the language linkage of the entity and (if applicable) its type.
Expand Down Expand Up @@ -9880,7 +9882,7 @@
in one translation unit and
the same function is declared without the \tcode{indeterminate} attribute
on the same parameter in its first declaration in another translation unit,
the program is ill-formed, no diagnostic required.
the program is ill-formed, no diagnostic required\ifndrdef{dcl.attr.indet.mismatched.declarations}.

\pnum
\begin{note}
Expand Down
18 changes: 9 additions & 9 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
a defaulted copy/move constructor or copy/move assignment operator
for a union of type \tcode{U} with a glvalue argument
that does not denote an object of type \cv{}~\tcode{U} within its lifetime,
the behavior is undefined.\ubdef{expr.basic.lvalue.union.initialization}
the behavior is undefined\ubdef{expr.basic.lvalue.union.initialization}.
\begin{note}
In C, an entire object of structure type can be accessed, e.g., using assignment.
By contrast, \Cpp{} has no notion of accessing an object of class type
Expand All @@ -345,7 +345,7 @@
If a pointer to $X$ would be valid in
the context of the evaluation of the expression\iref{basic.fundamental},
the result designates $X$;
otherwise, the behavior is undefined.\ubdef{expr.type.reference.lifetime}
otherwise, the behavior is undefined\ubdef{expr.type.reference.lifetime}.
\begin{note}
Before the lifetime of the reference has started or after it has ended,
the behavior is undefined (see~\ref{basic.life}).
Expand Down Expand Up @@ -686,7 +686,7 @@

\item Otherwise, if the bits in the value representation of
the object to which the glvalue refers
are not valid for the object's type, the behavior is undefined.\ubdef{conv.lval.valid.representation}
are not valid for the object's type, the behavior is undefined\ubdef{conv.lval.valid.representation}.
\begin{example}
\begin{codeblock}
bool f() {
Expand Down Expand Up @@ -1024,8 +1024,8 @@
exactly as a value of the floating-point type.
\end{note}
If the value being converted is
outside the range of values that can be represented, the behavior is undefined.
\ubdef{conv.fpint.int.not.represented}
outside the range of values that can be represented,
the behavior is undefined\ubdef{conv.fpint.int.not.represented}.
If the
source type is \keyword{bool}, the value \keyword{false} is converted to zero and the value
\keyword{true} is converted to one.
Expand Down Expand Up @@ -1079,7 +1079,7 @@
that is
within its lifetime or
within its period of construction or destruction\iref{class.cdtor},
the behavior is undefined.\ubdef{conv.ptr.virtual.base}
the behavior is undefined\ubdef{conv.ptr.virtual.base}.
Otherwise,
the result is a pointer to the base class subobject of
the derived class object.
Expand Down Expand Up @@ -1113,7 +1113,7 @@
\tcode{D}, a program that necessitates this conversion is ill-formed.
If class \tcode{D} does not contain the original member and
is not a base class of the class containing the original member,
the behavior is undefined.\ubdef{conv.member.missing.member}
the behavior is undefined\ubdef{conv.member.missing.member}.
Otherwise,
the result of the conversion refers to the same member as the pointer to
member before the conversion took place, but it refers to the base class
Expand Down Expand Up @@ -4507,14 +4507,14 @@
that is
within its lifetime or
within its period of construction or destruction\iref{class.cdtor},
the behavior is undefined.\ubdef{expr.dynamic.cast.pointer.lifetime}
the behavior is undefined\ubdef{expr.dynamic.cast.pointer.lifetime}.
If \tcode{v} is a glvalue of type \tcode{U} and
\tcode{v} does not refer to an object
whose type is similar to \tcode{U} and
that is
within its lifetime or
within its period of construction or destruction,
the behavior is undefined.\ubdef{expr.dynamic.cast.glvalue.lifetime}
the behavior is undefined\ubdef{expr.dynamic.cast.glvalue.lifetime}.

\pnum
If \tcode{T} is ``pointer to \cv{} \keyword{void}'', then the result
Expand Down
Loading