https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896

--- Comment #29 from Martin Uecker <muecker at gwdg dot de> ---
Am Mittwoch, dem 08.03.2023 um 17:13 +0000 schrieb qinzhao at gcc dot gnu.org:
> 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)
> > 

...
> 
> 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.

I think there are some fundamental differences: In one
case the size is encoded into the type and in the other
it is just an annotation that can be ignored.

> 
> 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. 

I am fine with supporting it, but one needs to decide
on the semantics in the case where inner is not accessed
via the outer struct.
> 
> Is the PLACEHOLDER_EXPR able to resolve this?

I don't know yet. 

Martin


>

Reply via email to