[PATCH] Various pages: SYNOPSIS: Use VLA syntax in function parameters
Joseph Myers
joseph@codesourcery.com
Sat Nov 12 17:02:34 GMT 2022
On Sat, 12 Nov 2022, Alejandro Colomar via Gcc wrote:
> > > No, assigning to a function parameter from within another parameter
> > > declaration wouldn't make sense. They should be readonly. Side effects
> > > should be forbidden, I think.
> >
> > Such assignments are already allowed. In a function definition, the side
> > effects (including in size expressions for array parameters adjusted to
> > pointers) take place before entry to the function body.
>
> Then, I'm guessing that rules need to change in a way that .initializer cannot
> appear as the left operand of an assignment-expression.
I think needing such a very special case rule tends to indicate that some
alternative syntax, not needing such a rule, would be better.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list