Hi Jakub, On Fri, Aug 09, 2024 at 02:24:48PM GMT, Jakub Jelinek wrote: > You can compile your sources with -Werror=sizeof-array-argument if you want > it to be an error,
The problem with that is that the error will still be enforced _after_ GCC would change the behavior of sizeof(aparam). Admittedly, I could write configure checks to determine if I have a version of GCC where sizeof(aparam) is bad and only enable the error there. > but there is nothing wrong about using sizeof on function > argument with array type if you know what you're doing, I have doubts here. Does anyone have an idea of what kind of program would be interested in that value? > and sizeof should be > usable on anything that has a size, not on everything except this special > case, so please don't enforce it on others. I don't want to enforce it if there's a single line of code that's using sizeof(aparam) for a legitimate purpose. But is there? Or can it be? Have a lovely day! Alex -- <https://www.alejandro-colomar.es/>
signature.asc
Description: PGP signature