The only bug I see here is: 

On 14/07/2026 10:41, Alexy via Gcc-bugs wrote:

> #include <stdio.h>
> 
> char name[] = "Janek";
> 
> void fn(void) {
>   
>     name[5] = 55;
This code here...> };
> 
> int main() {
> 
>   name[0] = *"Ella";
>    printf("Hello %s\n", name);
>    
>   name[0] = 49;
>    printf("Hello %s\n", name);
>    
>   name[0] = 'X';
>    printf("Hello %s\n", name);
> 
>   fn(); 
>     printf("Hello %s\n", name);
... creates undefined behaviour here, because 'name' is no-longer 
null-terminated.

> 
> }
> 
> // run output:
> // Hello Eanek
> // Hello 1anek
> // Hello Xanek
> // Hello Xanek7
> 
> // clang-21 gcc-14 tcc

Rather than making us guess, if you think you've found a bug, explain what you 
think is wrong.

R.

Reply via email to