* c-common.c (combine_strings): Only warn about long strings for C.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Tue, 7 Nov 2000 20:15:19 +0000 (20:15 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Tue, 7 Nov 2000 20:15:19 +0000 (20:15 +0000)
From-SVN: r37297

gcc/ChangeLog
gcc/c-common.c

index 79b575528b6e4a7146213ed8e217c7e880d27f7c..a4465b249fdb684f65d8eb2993022f64d19a5c8f 100644 (file)
@@ -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.
index ac0a10107074eb2b82df174005db78921aaf97a2..247145cf2ab6e3df7436e75d395e329ecee1746d 100644 (file)
@@ -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);