[stmt.ambig] # 8 Statements [[stmt]](./#stmt) ## 8.11 Ambiguity resolution [stmt.ambig] [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/statements.tex#L1367) There is an ambiguity in the grammar involving[*expression-statement*](stmt.expr#nt:expression-statement "8.3 Expression statement [stmt.expr]")*s* and [*declaration*](dcl.pre#nt:declaration "9.1 Preamble [dcl.pre]")*s*: An[*expression-statement*](stmt.expr#nt:expression-statement "8.3 Expression statement [stmt.expr]") with a [function-style explicit type conversion](expr.type.conv "7.6.1.4 Explicit type conversion (functional notation) [expr.type.conv]") as its leftmost subexpression can be indistinguishable from a [*declaration*](dcl.pre#nt:declaration "9.1 Preamble [dcl.pre]") where the first[*declarator*](dcl.decl.general#nt:declarator "9.3.1 General [dcl.decl.general]") starts with a ([.](#1.sentence-1) In those cases the[*statement*](stmt.pre#nt:statement "8.1 Preamble [stmt.pre]") is considered a [*declaration*](dcl.pre#nt:declaration "9.1 Preamble [dcl.pre]"), except as specified below[.](#1.sentence-2) [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/statements.tex#L1377) [*Note [1](#note-1)*: If the [*statement*](stmt.pre#nt:statement "8.1 Preamble [stmt.pre]") cannot syntactically be a[*declaration*](dcl.pre#nt:declaration "9.1 Preamble [dcl.pre]"), there is no ambiguity, so this rule does not apply[.](#2.sentence-1) In some cases, the whole [*statement*](stmt.pre#nt:statement "8.1 Preamble [stmt.pre]") needs to be examined to determine whether this is the case[.](#2.sentence-2) This resolves the meaning of many examples[.](#2.sentence-3) [*Example [1](#example-1)*: Assuming T is a[*simple-type-specifier*](dcl.type.simple#nt:simple-type-specifier "9.2.9.3 Simple type specifiers [dcl.type.simple]") ([[dcl.type.simple]](dcl.type.simple "9.2.9.3 Simple type specifiers")), T(a)->m = 7; // expression-statement T(a)++; // expression-statement T(a,5)<M; // expression, S​::​M hides ​::​M}}; void f(S s) {{auto(s)()->N; // expressionauto(s)()->M; // function declaration}{ S(s)()->N; // expression S(s)()->M; // expression}} — *end example*]