|
853 | 853 |
|
854 | 854 | \pnum
|
855 | 855 | There is an ambiguity in the grammar involving
|
856 |
| -\grammarterm{expression-statement}{s} and \grammarterm{}{declaration}{s}: An |
| 856 | +\grammarterm{expression-statement}{s} and \grammarterm{declaration}{s}: An |
857 | 857 | \grammarterm{expression-statement} with a function-style explicit type
|
858 | 858 | conversion~(\ref{expr.type.conv}) as its leftmost subexpression can be
|
859 |
| -indistinguishable from a \grammarterm{}{declaration} where the first |
860 |
| -\grammarterm{}{declarator} starts with a \tcode{(}. In those cases the |
861 |
| -\grammarterm{}{statement} is a \grammarterm{}{declaration}. \enternote To |
862 |
| -disambiguate, the whole \grammarterm{}{statement} might have to be examined |
863 |
| -to determine if it is an \grammarterm{expression-statement} or a |
864 |
| -\grammarterm{}{declaration}. This disambiguates many examples. |
| 859 | +indistinguishable from a \grammarterm{declaration} where the first |
| 860 | +\grammarterm{declarator} starts with a \tcode{(}. In those cases the |
| 861 | +\grammarterm{statement} is a \grammarterm{declaration}. |
| 862 | + |
| 863 | +\pnum |
| 864 | +\enternote |
| 865 | +If the \grammarterm{statement} cannot syntactically be a |
| 866 | +\grammarterm{declaration}, there is no ambiguity, |
| 867 | +so this rule does not apply. |
| 868 | +The whole \grammarterm{statement} might need to be examined |
| 869 | +to determine whether this is the case. This resolves the meaning |
| 870 | +of many examples. |
865 | 871 | \enterexample
|
866 |
| -assuming \tcode{T} is a |
| 872 | +Assuming \tcode{T} is a |
867 | 873 | \grammarterm{simple-type-specifier}~(\ref{dcl.type}),
|
868 | 874 |
|
869 | 875 | \begin{codeblock}
|
|
882 | 888 | semantic reasons, but that does not affect the syntactic analysis.
|
883 | 889 | \exitexample
|
884 | 890 |
|
885 |
| -\pnum |
886 |
| -The remaining cases are \grammarterm{}{declaration}{s}. |
| 891 | +The remaining cases are \grammarterm{declaration}{s}. |
887 | 892 | \enterexample
|
888 | 893 |
|
889 | 894 | \begin{codeblock}
|
|
0 commit comments