On Thu, 12 Aug 2021, Martin Uecker wrote:
> Evaluate type arguments of sizeof that are structs of variable size [PR101838]
>
> Evaluate type arguments of sizeof for all types of variable size
> and not just for VLAs. This fixes PR101838 and some issues related
> to PR29970 where statement
Joseph,
here is the patch for c_expr_sizeof_type you had suggested.
Best,
Martin
Evaluate type arguments of sizeof that are structs of variable size [PR101838]
Evaluate type arguments of sizeof for all types of variable size
and not just for VLAs. This fixes PR101838 and some issues
On Mon, 9 Aug 2021, Uecker, Martin wrote:
> I am still trying to figure out what the branch guarded
> by c_vla_type_p is for in c_expr_sizeof_type. The comment
> talks about [*], but how would you apply sizeof to
> such an array? One can form something like
The comment describes a requirement
Am Montag, den 09.08.2021, 21:42 + schrieb Joseph Myers:
> On Mon, 9 Aug 2021, Uecker, Martin wrote:
>
> > Evaluate arguments of sizeof that are structs of variable size.
> >
> > Evaluate arguments of sizeof for all types of variable size
> > and not just for VLAs. This fixes some issues
On Mon, 9 Aug 2021, Uecker, Martin wrote:
> Evaluate arguments of sizeof that are structs of variable size.
>
> Evaluate arguments of sizeof for all types of variable size
> and not just for VLAs. This fixes some issues related to
> [PR29970] where statement expressions need to be evaluated
> so
Here is a patch which changes the behavior of sizeof
when applied to structs of variable size (a GNU
extension) to evaluate its arguments as it does
for VLAs. This is a breaking change, but it seems
this is required if we want to fix [PR29970] (and
it is also more consistent). Together with the