https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896
--- Comment #24 from qinzhao at gcc dot gnu.org ---
(In reply to Martin Uecker from comment #15)
>
> Yes, but that syntax would be intuitive which I would see
> as an advantage.
Yes, I agree.
>
> But I am not saying we shouldn't have the attribute first.
both the new attribute and the C's syntax extension might be needed at the same
time, I think.
1. Attribute might be better for changing the existing source code to make them
bound-checking friendly;
2. new code can use the C's syntax change, and hopefully this new syntax
extension can be made into next C language standard.
however, I think that both the new attribute and the new C syntax extension
should support the similar user interface. We might need to decide on this
first.
right now, the user interface we cannot agreed on is:
whether we should support the following nested annotation (either with
attribute or with the C syntax extension):
struct object {
...
unsigned int items;
...
struct inner {
...
int flex[];
};
} *ptr;
My opinion is: No, we should not support this, it will make the implementation
much more complicated both for attribute and for C syntax extension.
But I am not very sure on this yet.
Is the PLACEHOLDER_EXPR able to resolve this?