bwendling wrote:

This LGTM as well. I have a question about the "sub-object" part. Do we attempt 
to discover the sub-object past any casting? A motivating example:

```c
char mux[10][10][10];

printf("%ld\n", __builtin_dynamic_object_size(&((char *)&mux[1][1])[var], 1));
```

GCC prints `89` (when `var` is 1). In the changes I'm making to the sub-object 
calculations, I want to say that this should print `9`, because the sub-object 
is `mux[1][1]` and not a one-dimensional array. There could be arguments made 
for both options, so I'd like to get everyone's opinions.

https://github.com/llvm/llvm-project/pull/96573
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to