On 2026-07-14 10:51:47 +0000, Alexy via Tinycc-devel wrote:
>
> No erros no warnings. Just compile and work
>
> #include <stdio.h>
>
> int main()
> {
> char* t[5] = {"999"};
>
> t[0] = "123456";
> t[4] = "X";
> t[15] = "abcdef";
> t[25] = "MNO";
> t[35] = "C";
>
> printf( "%s\n%s\n%s\n%s\n", *t, t[4], t[15], t[25] );
> }
This is undefined behavior. The compiler is not required to warn
(and cannot always warn). With GCC, the issue is detected by using
"-fsanitize=undefined".
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel