This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: warning fix take two
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch: warning fix take two
- From: Anthony Green <green at cygnus dot com>
- Date: Sat, 10 Feb 2001 07:02:39 -0800 (PST)
- Reply-to: green at cygnus dot com
This is the text suggested by Geert Bosch. The current warning is
confusing at best. Ok to commit?
2001-02-10 Anthony Green <green@redhat.com>
* c-common.c (combine_strings): Improve warning message.
Index: gcc/c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.224
diff -c -r1.224 c-common.c
*** c-common.c 2001/01/28 01:50:04 1.224
--- c-common.c 2001/02/10 14:49:53
***************
*** 466,472 ****
nchars = wide_flag ? length / wchar_bytes : length;
if (pedantic && nchars - 1 > nchars_max && c_language == clk_c)
! pedwarn ("string length `%d' is greater than the minimum length `%d' ISO C%d is required to support",
nchars - 1, nchars_max, flag_isoc99 ? 99 : 89);
/* Create the array type for the string constant.
--- 466,472 ----
nchars = wide_flag ? length / wchar_bytes : length;
if (pedantic && nchars - 1 > nchars_max && c_language == clk_c)
! pedwarn ("string length `%d' is greater than the length `%d' ISO C%d compilers are required to support",
nchars - 1, nchars_max, flag_isoc99 ? 99 : 89);
/* Create the array type for the string constant.