[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C Strings and String Literals. (Was: Pascal rides again)

From: Alejandro Colomar
Subject: Re: C Strings and String Literals. (Was: Pascal rides again)
Date: Mon, 14 Nov 2022 12:41:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1

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

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:


Apropos of help from the compiler, I normally run gcc via this script
and stamp out all warnings.
         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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]