(2 years later...)

Hi Doug!

On 11/13/22 23:39, Douglas McIlroy wrote:
> > Wouldn't it be nice to use -Wunterminated-strings and let the
> > compiler yell at me if I write a string literal [that's too long]?
>
> A good idea. Assuming you use gcc, please propose it at
> https://gcc.gnu.org/bugzilla.

The warning has been merged into gcc.  It will be in gcc-15.
It's called -Wunterminated-string-initialization, enabled in -Wextra.

<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=44c9403ed1833ae71a59e84f9e37af3182be0df5>

Have a lovely day!
Alex

> Apropos of help from the compiler, I normally run gcc via this script
> and stamp out all warnings.
>         #!/bin/bash
>         exec /bin/gcc -Wall -Wpedantic -Wextra "$@"
>
> Doug

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature

Reply via email to