This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
warn/croak on "string" "string" auto-joins
- From: Adam Monsen <haircut at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 17 Aug 2004 10:32:54 -0700
- Subject: warn/croak on "string" "string" auto-joins
- Reply-to: Adam Monsen <haircut at gmail dot com>
String auto-joins can be dangerous. Is there a way to tell the
compiler to warn/croak when an auto-join occurs?
For instance, find the bug in this code:
char *months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug" "Sep", "Oct", "Nov", "Dec"};
If not, I'd like to suggest a way to ask the compiler to strictly
check for this.
--
Adam Monsen <adamm@wazamatta.com>
http://adammonsen.com/