[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C Strings and String Literals. (Was: Pascal rides again)
From: |
Douglas McIlroy |
Subject: |
Re: C Strings and String Literals. (Was: Pascal rides again) |
Date: |
Sun, 13 Nov 2022 17:39:20 -0500 |
> 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.
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
- Re: C Strings and String Literals. (Was: Pascal rides again),
Douglas McIlroy <=