From 83dbde4925d03756a70c76fd2b799e9f29c34834 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Thu, 3 Jul 2025 10:31:33 +0800 Subject: [PATCH 1/8] [dcl.fct.default] Replace the uses of "local variable" ... with "variable with automatic storage duration" --- source/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/declarations.tex b/source/declarations.tex index d3821debca..edce5b60e8 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -4509,7 +4509,7 @@ \pnum \begin{note} -A local variable cannot be odr-used\iref{term.odr.use} +A variable with automatic storage duration cannot be odr-used\iref{term.odr.use} in a default argument. \end{note} \begin{example} From d57ba2906a64d71a681b0b8a8aaef2cf44bf06e9 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Thu, 3 Jul 2025 10:42:28 +0800 Subject: [PATCH 2/8] [stmt.jump.general] Replace index for "destruction of local variable" ... with "destruction of block variable with automatic storage duration" --- source/statements.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/statements.tex b/source/statements.tex index f034493787..cb6fb1534c 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -1025,7 +1025,7 @@ \end{bnf} \pnum -\indextext{local variable!destruction of}% +\indextext{block variable with automatic storage duration!destruction of}% \indextext{scope!destructor and exit from}% \begin{note} On exit from a scope (however accomplished), objects with automatic storage From ed6f8f80cc8f603d40ed82b1f2cc85a07c20ee69 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Thu, 3 Jul 2025 10:32:05 +0800 Subject: [PATCH 3/8] [stmt.return] Replace the uses of "local variable" ... with "block variable with automatic storage duration" --- source/statements.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/statements.tex b/source/statements.tex index cb6fb1534c..76232e3c86 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -1136,11 +1136,11 @@ The copy-initialization of the result of the call is sequenced before the destruction of temporaries at the end of the full-expression established by the operand of the \tcode{return} statement, which, in turn, is sequenced -before the destruction of local variables\iref{stmt.jump} of the block +before the destruction of block variables with automatic storage duration\iref{stmt.jump} of the block enclosing the \tcode{return} statement. \begin{note} These operations -are sequenced before the destruction of local variables +are sequenced before the destruction of block variables with automatic storage duration in each remaining enclosing block of the function\iref{stmt.dcl}, which, in turn, is sequenced before the evaluation of From e6635f1bda931515af504575b531b43330ce0853 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Thu, 3 Jul 2025 10:32:56 +0800 Subject: [PATCH 4/8] [except.ctor] Replace the uses of "local variable" ... with "variable with automatic storage duration" --- source/exceptions.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/exceptions.tex b/source/exceptions.tex index 23e143e137..cc3e8798d8 100644 --- a/source/exceptions.tex +++ b/source/exceptions.tex @@ -396,7 +396,7 @@ constructed, but not yet destroyed, since the try block was entered. If an exception is thrown during the destruction of temporaries or -local variables for a \keyword{return} statement\iref{stmt.return}, +variables for a \keyword{return} statement\iref{stmt.return}, the destructor for the returned object (if any) is also invoked. The objects are destroyed in the reverse order of the completion of their construction. @@ -418,11 +418,11 @@ } \end{codeblock} At \#1, the returned object of type \tcode{A} is constructed. -Then, the local variable \tcode{b} is destroyed\iref{stmt.jump}. -Next, the local variable \tcode{y} is destroyed, +Then, the variable \tcode{b} is destroyed\iref{stmt.jump}. +Next, the variable \tcode{y} is destroyed, causing stack unwinding, resulting in the destruction of the returned object, -followed by the destruction of the local variable \tcode{a}. +followed by the destruction of the variable \tcode{a}. Finally, the returned object is constructed again at \#2. \end{example} From 6698ed40210299f3c756891c5e1a9c2872f1b801 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Thu, 3 Jul 2025 10:35:59 +0800 Subject: [PATCH 5/8] [facet.num.get.virtuals] Replace the uses of "local variable" ... with "variable with automatic storage duration" --- source/text.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/text.tex b/source/text.tex index 22990970cf..1fc81d1f27 100644 --- a/source/text.tex +++ b/source/text.tex @@ -2592,7 +2592,7 @@ \begin{description} \stage{1} -The function initializes local variables via +The function initializes variables with automatic storage duration via \begin{codeblock} fmtflags flags = str.flags(); fmtflags basefield = (flags & ios_base::basefield); @@ -2641,7 +2641,7 @@ \stage{2} If \tcode{in == end} then stage 2 terminates. Otherwise a \tcode{charT} is taken from \tcode{in} and -local variables are initialized as if by +variables with automatic storage duration are initialized as if by \begin{codeblock} char_type ct = *in; char c = src[find(atoms, atoms + sizeof(src) - 1, ct) - atoms]; From 076dfa22d6a7d28802b5a52b09667c5b137d28de Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Thu, 3 Jul 2025 10:36:24 +0800 Subject: [PATCH 6/8] [facet.num.put.virtuals] Replace the uses of "local variable" ... with "variable with automatic storage duration" --- source/text.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/text.tex b/source/text.tex index 1fc81d1f27..eea6345d8e 100644 --- a/source/text.tex +++ b/source/text.tex @@ -2890,7 +2890,8 @@ \effects Writes characters to the sequence \tcode{out}, formatting \tcode{val} as desired. -In the following description, \tcode{loc} names a local variable initialized as +In the following description, \tcode{loc} names a variable with +automatic storage duration initialized as \begin{codeblock} locale loc = str.getloc(); \end{codeblock} @@ -2934,7 +2935,8 @@ \begin{description} \stage{1} The first action of stage 1 is to determine a conversion specifier. -The tables that describe this determination use the following local variables +The tables that describe this determination use the following variables with +automatic storage duration. \begin{codeblock} fmtflags flags = str.flags(); @@ -3032,7 +3034,7 @@ use_facet>(loc).widen(c) \end{codeblock} -A local variable \tcode{punct} is initialized via +A variable \tcode{punct} with automatic storage duration is initialized via \begin{codeblock} const numpunct& punct = use_facet>(loc); \end{codeblock} @@ -3045,7 +3047,7 @@ Decimal point characters(.) are replaced by \tcode{punct.decimal_point()}. \stage{3} -A local variable is initialized as +A variable with automatic storage is initialized as \begin{codeblock} fmtflags adjustfield = (flags & (ios_base::adjustfield)); \end{codeblock} From af7999baca602bb1e84c0c65f3de1ab1d6a922d5 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Thu, 3 Jul 2025 10:37:18 +0800 Subject: [PATCH 7/8] [re.regiter.incr] Replace the uses of "local variable" ... with "variable with automatic storage duration" --- source/text.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/text.tex b/source/text.tex index eea6345d8e..e2d44c3804 100644 --- a/source/text.tex +++ b/source/text.tex @@ -12441,7 +12441,8 @@ \begin{itemdescr} \pnum \effects -Constructs a local variable \tcode{start} of type \tcode{BidirectionalIterator} and +Constructs a variable \tcode{start} of type \tcode{BidirectionalIterator} +with automatic storage duration and initializes it with the value of \tcode{match[0].second}. \pnum From d7e62e8b863d294e6ecfc8994d0c54882c21d9e8 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Thu, 3 Jul 2025 10:37:38 +0800 Subject: [PATCH 8/8] [re.tokiter.incr] Replace the uses of "local variable" ... with "variable with automatic storage duration" --- source/text.tex | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/text.tex b/source/text.tex index e2d44c3804..478b8cc21c 100644 --- a/source/text.tex +++ b/source/text.tex @@ -12771,9 +12771,8 @@ \begin{itemdescr} \pnum \effects -Constructs a local variable \tcode{prev} of -type \tcode{position_iterator}, initialized with the value -of \tcode{position}. +Constructs a variable \tcode{prev} of type \tcode{position_iterator} +with automatic storage duration, initialized with the value of \tcode{position}. \pnum If \tcode{*this} is a suffix iterator, sets \tcode{*this} to an