|
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");
|
|
8145 | 8145 | An \tcode{asm} declaration has the form
|
8146 | 8146 | \begin{bnf}
|
8147 | 8147 | \nontermdef{asm-declaration}\br
|
8148 |
| - \opt{attribute-specifier-seq} \keyword{asm} \terminal{(} string-literal \terminal{)} \terminal{;} |
| 8148 | + \opt{attribute-specifier-seq} \keyword{asm} \terminal{(} balanced-token-seq \terminal{)} \terminal{;} |
8149 | 8149 | \end{bnf}
|
8150 | 8150 |
|
8151 |
| -The \tcode{asm} declaration is conditionally-supported; its meaning is |
8152 |
| -\impldef{meaning of \tcode{asm} declaration}. |
| 8151 | +The \tcode{asm} declaration is conditionally-supported; |
| 8152 | +any restrictions on the \grammarterm{balanced-token-seq} and |
| 8153 | +its meaning is \impldef{meaning of \tcode{asm} declaration}. |
8153 | 8154 | The optional \grammarterm{attribute-specifier-seq} in
|
8154 | 8155 | an \grammarterm{asm-declaration} appertains to the \tcode{asm} declaration.
|
8155 | 8156 | \begin{note}
|
|
8185 | 8186 | %
|
8186 | 8187 | \begin{bnf}
|
8187 | 8188 | \nontermdef{linkage-specification}\br
|
8188 |
| - \keyword{extern} string-literal \terminal{\{} \opt{declaration-seq} \terminal{\}}\br |
8189 |
| - \keyword{extern} string-literal name-declaration |
| 8189 | + \keyword{extern} unevaluated-string \terminal{\{} \opt{declaration-seq} \terminal{\}}\br |
| 8190 | + \keyword{extern} unevaluated-string name-declaration |
8190 | 8191 | \end{bnf}
|
8191 | 8192 |
|
8192 |
| -The \grammarterm{string-literal} indicates the required language linkage. |
| 8193 | +The \grammarterm{unevaluated-string} indicates the required language linkage. |
| 8194 | +\begin{note} |
| 8195 | +Escape sequences and \grammarterm{universal-character-name}s |
| 8196 | +have been replaced\iref{lex.string.uneval}. |
| 8197 | +\end{note} |
8193 | 8198 | This document specifies the semantics for the
|
8194 |
| -\grammarterm{string-literal}{s} \tcode{"C"} and \tcode{"C++"}. Use of a |
8195 |
| -\grammarterm{string-literal} other than \tcode{"C"} or \tcode{"C++"} is |
8196 |
| -conditionally-supported, with \impldef{semantics of linkage specifiers} semantics. |
| 8199 | +\grammarterm{unevaluated-string}{s} \tcode{"C"} and \tcode{"C++"}. |
| 8200 | +Use of an \grammarterm{unevaluated-string} |
| 8201 | +other than \tcode{"C"} or \tcode{"C++"} is conditionally-supported, |
| 8202 | +with \impldef{semantics of linkage specifiers} semantics. |
8197 | 8203 | \begin{note}
|
8198 |
| -Therefore, a linkage-specification with a \grammarterm{string-literal} that |
8199 |
| -is unknown to the implementation requires a diagnostic. |
| 8204 | +Therefore, a \grammarterm{linkage-specification} with a language linkage |
| 8205 | +that is unknown to the implementation requires a diagnostic. |
8200 | 8206 | \end{note}
|
8201 | 8207 |
|
8202 | 8208 | \recommended
|
8203 |
| -The spelling of the \grammarterm{string-literal} should be |
8204 |
| -taken from the document defining that language. For example, \tcode{Ada} |
8205 |
| -(not \tcode{ADA}) and \tcode{Fortran} or \tcode{FORTRAN}, depending on |
8206 |
| -the vintage. |
| 8209 | +The spelling of the language linkage should be taken |
| 8210 | +from the document defining that language. |
| 8211 | +For example, \tcode{Ada} (not \tcode{ADA}) and |
| 8212 | +\tcode{Fortran} or \tcode{FORTRAN}, depending on the vintage. |
8207 | 8213 |
|
8208 | 8214 | \pnum
|
8209 | 8215 | \indextext{specification!linkage!implementation-defined}%
|
|
8806 | 8812 | An
|
8807 | 8813 | \grammarterm{attribute-argument-clause} may be present and, if present, it shall have the form:
|
8808 | 8814 | \begin{ncbnf}
|
8809 |
| -\terminal{(} string-literal \terminal{)} |
| 8815 | +\terminal{(} unevaluated-string \terminal{)} |
8810 | 8816 | \end{ncbnf}
|
8811 | 8817 | \begin{note}
|
8812 |
| -The \grammarterm{string-literal} in the \grammarterm{attribute-argument-clause} |
| 8818 | +The \grammarterm{unevaluated-string} in the \grammarterm{attribute-argument-clause} |
8813 | 8819 | can be used to explain the rationale for deprecation and/or to suggest a replacing entity.
|
8814 | 8820 | \end{note}
|
8815 | 8821 |
|
|
9020 | 9026 | and, if present, shall have the form:
|
9021 | 9027 |
|
9022 | 9028 | \begin{ncbnf}
|
9023 |
| -\terminal{(} string-literal \terminal{)} |
| 9029 | +\terminal{(} unevaluated-string \terminal{)} |
9024 | 9030 | \end{ncbnf}
|
9025 | 9031 |
|
9026 | 9032 | \pnum
|
|
9067 | 9073 | This is typically because discarding the return value
|
9068 | 9074 | of a nodiscard call has surprising consequences.
|
9069 | 9075 | \end{note}
|
9070 |
| -The \grammarterm{string-literal} |
| 9076 | +The \grammarterm{unevaluated-string} |
9071 | 9077 | in a \tcode{nodiscard} \grammarterm{attribute-argument-clause}
|
9072 | 9078 | should be used in the message of the warning
|
9073 | 9079 | as the rationale for why the result should not be discarded.
|
|
0 commit comments