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.

Thanks!

Assuming you use gcc, please propose it at
https://gcc.gnu.org/bugzilla.

Yep I use gcc. I'm too lazy to open bugzilla. I reported it to the mailing list, and it seems it's an easy thing to do (at least compared to what it could have been). I'll give it a try to implement it. I CCd you in the thread, in case you are interested in it. For anyone else, it's:

<https://gcc.gnu.org/pipermail/gcc/2022-November/239980.html>


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 "$@"

Hmm, might be interesting to create a ccw alias, and a cce one. I always feel that writing those two/three arguments is a bit tiring.


Doug


Cheers,

Alex

Reply via email to