|Subject:||Re: [Tinycc-devel] match formats and arguments exactly|
|Date:||Fri, 21 Jun 2019 14:19:10 +0000|
I'm not protesting, I'm just offering a patch (in a series of patches) that makes the TCC source code free of easily avoided undefined behavior.
I admit I'm not very interested in knowing whether GCC warns or not for the things I am fixing, because GCC neither warns for everything that's undefined nor limits its warnings to things that are undefined. The C standards are my reference, in this case, https://port70.net/~nsz/c/c11/n1570.html#188.8.131.52p8 , which says:
The unsigned int argument is
If no l length modifier is present, the argument shall be a pointer to the initial element of an array of character type.
… If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined.
I was asking about the patch because I have encountered developers who prefer to keep their invalid pointer arithmetic, uses of uninitialized memory and misuse of printf, in which case I don't insist.
|[Prev in Thread]||Current Thread||[Next in Thread]|