From f8136648fb6e8fb357fe576c4ab241264263dea6 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Tue, 7 Nov 2000 20:15:19 +0000 Subject: [PATCH] * c-common.c (combine_strings): Only warn about long strings for C. From-SVN: r37297 --- gcc/ChangeLog | 4 ++++ gcc/c-common.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 79b575528b6..a4465b249fd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2000-11-07 Kaveh R. Ghazi + + * c-common.c (combine_strings): Only warn about long strings for C. + Tue Nov 7 19:44:30 2000 J"orn Rennecke * combine.c (distribute_notes): Fix typo in last change. diff --git a/gcc/c-common.c b/gcc/c-common.c index ac0a1010707..247145cf2ab 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); -- 2.30.2