On 2023-10-24 16:38, Martin Uecker wrote:
Here is another proposal: Add a new builtin function
__builtin_with_size(x, size)
that return x but behaves similar to an allocation
function in that BDOS can look at the size argument
to discover the size.
The FE insers this function when the field is accessed:
__builtin_with_size(x.buf, x.L);
In fact if we do this at the allocation site for x, it may also help
with future warnings, where the compiler could flag a warning or error
when it encounters this builtin but does not see an assignment to x.L.
Thanks,
Sid