Closed pkelsey closed 5 months ago
Hi @pkelsey !
I'm not sure I understand why you're changing it to W * sizeof(T), and not just W ?
Hi @pkelsey !
I'm not sure I understand why you're changing it to W * sizeof(T), and not just W ?
I was in the process of pushing the fix for that as you were typing I think. I have no explanation, so am left to feebly point at the hour of the day and the quality of the coffee.
Ahahah that is a perfectly good explanation, merged, thanks a lot!
This type of array size notation in C serves only a documentation purpose. That the array-size documentation provided in this macro-templated inline function declaration is not correct for any of the instantiations would be a minor nit except that gcc versions that support -Wstringop-overread and/or -Wstringop-overflow use the array sizes as guidance for when to generate those warnings (errors under -Werror).
An alternative would be to change the parameter types to explicitly be pointers - this fix preserves the documentation intent.
This resolves #185.