diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2000-11-07 20:15:19 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2000-11-07 20:15:19 +0000 |
commit | f8136648fb6e8fb357fe576c4ab241264263dea6 (patch) | |
tree | 41a3fdeb669fdc65e0c175fe929616e99fb94143 /gcc | |
parent | 71fd5a5123bf2b6ba31857ac33cf1b81ccb2638e (diff) | |
download | gcc-f8136648fb6e8fb357fe576c4ab241264263dea6.zip gcc-f8136648fb6e8fb357fe576c4ab241264263dea6.tar.gz gcc-f8136648fb6e8fb357fe576c4ab241264263dea6.tar.bz2 |
* c-common.c (combine_strings): Only warn about long strings for C.
From-SVN: r37297
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-common.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 79b5755..a4465b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2000-11-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * c-common.c (combine_strings): Only warn about long strings for C. + Tue Nov 7 19:44:30 2000 J"orn Rennecke <amylaar@redhat.com> * combine.c (distribute_notes): Fix typo in last change. diff --git a/gcc/c-common.c b/gcc/c-common.c index ac0a101..247145c 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -426,7 +426,7 @@ combine_strings (strings) /* Compute the number of elements, for the array type. */ nchars = wide_flag ? length / wchar_bytes : length; - if (pedantic && nchars > nchars_max) + if (pedantic && nchars > 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, nchars_max, flag_isoc99 ? 99 : 89); |