Differences between clang and gcc handling of int[static n] function arguments
Florian Weimer
fweimer@redhat.com
Wed May 24 09:06:12 GMT 2023
* Jonathan Wakely via Gcc:
>> It seems it might even be trivial enough for me to investigate and
>> tackle myself, in some spare time.
>>
>> I see very little code using either of these features, so it's
>> definitely not a high priority task regardless.
>>
>
> Glibc uses the nonnull attribute in many places. Libstdc++ uses it in a few
> places.
Note that the glibc uses are frequently incompatible with libstdc++
(std::vector in particular). Unfortunately, there is no consensus to
fix this. For example, one issue is that
memset(vec.data(), 0, sizeof(decltype(vec)::value_type) * vec.size())
isn't necessarily defined even for vectors of POD type.
Thanks,
Florian
More information about the Gcc
mailing list