Hello, On Wed, 22 Jan 2025, Martin Uecker wrote:
> > You need to decide which is which after seeing the ".". I'm guessing what > > you mean is that on seeing ".ident" as first two tokens inside in > > initializer-list you go the designator route, and not the > > initializer/assignment-expression route, even though the latter can now > > also start with ".ident". > > What I mean is that after parsing the dot followed by an identifier x, > if x is the name of a member of the structure S which is being initialized, > it is a designator, otherwise it is an expression that uses .x to refer > to some member of an enclosing definition. So, as I guessed. > So you do not need to look further. But maybe I am missing something > else. Like ... > > Note further that you may have '{ .y[1][3].z }', which is still not a > > designation, but an expression under your proposal, whereas > > '{ .y[1][3].z = 1 }' would remain a designation. This shows that you > > now need arbitrary look-ahead to disambiguate the two. A Very Bad Idea. ... this? Ciao, Michael.