* c-common.c (check_format_info): Warn for non-constant format
commitb94933f5caf4e7c0e97c295d662918e7fb16f81b
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Dec 2000 07:52:20 +0000 (7 07:52 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Dec 2000 07:52:20 +0000 (7 07:52 +0000)
treec1e3c842a16f18e46f1ed159b69069f9fbf87597
parent21da11cdfae937f122761d4d418b72a74b72897d
* c-common.c (check_format_info): Warn for non-constant format
strings with strftime formats if -Wformat-nonliteral.  Where the
format can convert arguments, if the format is not a string
literal and there are no arguments to the format, give a different
warning message from the general non-string-literal case.

testsuite:
* gcc.dg/format-nonlit-3.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38105 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format-nonlit-3.c [new file with mode: 0644]