|
77 | 77 | \begin{bnf}
|
78 | 78 | \nontermdef{static_assert-declaration}\br
|
79 | 79 | \keyword{static_assert} \terminal{(} constant-expression \terminal{)} \terminal{;}\br
|
80 |
| - \keyword{static_assert} \terminal{(} constant-expression \terminal{,} string-literal \terminal{)} \terminal{;} |
| 80 | + \keyword{static_assert} \terminal{(} constant-expression \terminal{,} unevaluated-string \terminal{)} \terminal{;} |
81 | 81 | \end{bnf}
|
82 | 82 |
|
83 | 83 | \begin{bnf}
|
|
264 | 264 | the \grammarterm{static_assert-declaration} \defnx{fails}{\idxcode{static_assert}!failed},
|
265 | 265 | the program is ill-formed, and the resulting
|
266 | 266 | diagnostic message\iref{intro.compliance} should include the text of
|
267 |
| -the \grammarterm{string-literal}, if one is supplied. |
| 267 | +the \grammarterm{unevaluated-string}, if one is supplied. |
268 | 268 | \begin{example}
|
269 | 269 | \begin{codeblock}
|
270 | 270 | static_assert(sizeof(int) == sizeof(void*), "wrong pointer size");
|
|
8169 | 8169 | An \tcode{asm} declaration has the form
|
8170 | 8170 | \begin{bnf}
|
8171 | 8171 | \nontermdef{asm-declaration}\br
|
8172 |
| - \opt{attribute-specifier-seq} \keyword{asm} \terminal{(} string-literal \terminal{)} \terminal{;} |
| 8172 | + \opt{attribute-specifier-seq} \keyword{asm} \terminal{(} balanced-token-seq \terminal{)} \terminal{;} |
8173 | 8173 | \end{bnf}
|
8174 | 8174 |
|
8175 |
| -The \tcode{asm} declaration is conditionally-supported; its meaning is |
8176 |
| -\impldef{meaning of \tcode{asm} declaration}. |
| 8175 | +The \tcode{asm} declaration is conditionally-supported; |
| 8176 | +any restrictions on the \grammarterm{balanced-token-seq} and |
| 8177 | +its meaning are \impldef{meaning of \tcode{asm} declaration}. |
8177 | 8178 | The optional \grammarterm{attribute-specifier-seq} in
|
8178 | 8179 | an \grammarterm{asm-declaration} appertains to the \tcode{asm} declaration.
|
8179 | 8180 | \begin{note}
|
|
8209 | 8210 | %
|
8210 | 8211 | \begin{bnf}
|
8211 | 8212 | \nontermdef{linkage-specification}\br
|
8212 |
| - \keyword{extern} string-literal \terminal{\{} \opt{declaration-seq} \terminal{\}}\br |
8213 |
| - \keyword{extern} string-literal name-declaration |
| 8213 | + \keyword{extern} unevaluated-string \terminal{\{} \opt{declaration-seq} \terminal{\}}\br |
| 8214 | + \keyword{extern} unevaluated-string name-declaration |
8214 | 8215 | \end{bnf}
|
8215 | 8216 |
|
8216 |
| -The \grammarterm{string-literal} indicates the required language linkage. |
| 8217 | +The \grammarterm{unevaluated-string} indicates the required language linkage. |
| 8218 | +\begin{note} |
| 8219 | +Escape sequences and \grammarterm{universal-character-name}s |
| 8220 | +have been replaced\iref{lex.string.uneval}. |
| 8221 | +\end{note} |
8217 | 8222 | This document specifies the semantics for the
|
8218 |
| -\grammarterm{string-literal}{s} \tcode{"C"} and \tcode{"C++"}. Use of a |
8219 |
| -\grammarterm{string-literal} other than \tcode{"C"} or \tcode{"C++"} is |
8220 |
| -conditionally-supported, with \impldef{semantics of linkage specifiers} semantics. |
| 8223 | +\grammarterm{unevaluated-string}{s} \tcode{"C"} and \tcode{"C++"}. |
| 8224 | +Use of an \grammarterm{unevaluated-string} |
| 8225 | +other than \tcode{"C"} or \tcode{"C++"} is conditionally-supported, |
| 8226 | +with \impldef{semantics of linkage specifiers} semantics. |
8221 | 8227 | \begin{note}
|
8222 |
| -Therefore, a linkage-specification with a \grammarterm{string-literal} that |
8223 |
| -is unknown to the implementation requires a diagnostic. |
| 8228 | +Therefore, a \grammarterm{linkage-specification} with a language linkage |
| 8229 | +that is unknown to the implementation requires a diagnostic. |
8224 | 8230 | \end{note}
|
8225 | 8231 |
|
8226 | 8232 | \recommended
|
8227 |
| -The spelling of the \grammarterm{string-literal} should be |
8228 |
| -taken from the document defining that language. For example, \tcode{Ada} |
8229 |
| -(not \tcode{ADA}) and \tcode{Fortran} or \tcode{FORTRAN}, depending on |
8230 |
| -the vintage. |
| 8233 | +The spelling of the language linkage should be taken |
| 8234 | +from the document defining that language. |
| 8235 | +For example, \tcode{Ada} (not \tcode{ADA}) and |
| 8236 | +\tcode{Fortran} or \tcode{FORTRAN}, depending on the vintage. |
8231 | 8237 |
|
8232 | 8238 | \pnum
|
8233 | 8239 | \indextext{specification!linkage!implementation-defined}%
|
|
8830 | 8836 | An
|
8831 | 8837 | \grammarterm{attribute-argument-clause} may be present and, if present, it shall have the form:
|
8832 | 8838 | \begin{ncbnf}
|
8833 |
| -\terminal{(} string-literal \terminal{)} |
| 8839 | +\terminal{(} unevaluated-string \terminal{)} |
8834 | 8840 | \end{ncbnf}
|
8835 | 8841 | \begin{note}
|
8836 |
| -The \grammarterm{string-literal} in the \grammarterm{attribute-argument-clause} |
| 8842 | +The \grammarterm{unevaluated-string} in the \grammarterm{attribute-argument-clause} |
8837 | 8843 | can be used to explain the rationale for deprecation and/or to suggest a replacing entity.
|
8838 | 8844 | \end{note}
|
8839 | 8845 |
|
|
9044 | 9050 | and, if present, shall have the form:
|
9045 | 9051 |
|
9046 | 9052 | \begin{ncbnf}
|
9047 |
| -\terminal{(} string-literal \terminal{)} |
| 9053 | +\terminal{(} unevaluated-string \terminal{)} |
9048 | 9054 | \end{ncbnf}
|
9049 | 9055 |
|
9050 | 9056 | \pnum
|
|
9091 | 9097 | This is typically because discarding the return value
|
9092 | 9098 | of a nodiscard call has surprising consequences.
|
9093 | 9099 | \end{note}
|
9094 |
| -The \grammarterm{string-literal} |
| 9100 | +The \grammarterm{unevaluated-string} |
9095 | 9101 | in a \tcode{nodiscard} \grammarterm{attribute-argument-clause}
|
9096 | 9102 | should be used in the message of the warning
|
9097 | 9103 | as the rationale for why the result should not be discarded.
|
|
0 commit comments