c-common.c (check_format_info): Warn for non-constant format strings with strftime...
authorJoseph Myers <jsm28@cam.ac.uk>
Thu, 7 Dec 2000 07:52:20 +0000 (07:52 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Thu, 7 Dec 2000 07:52:20 +0000 (07:52 +0000)
commit1c248308f49a5410b9e69330a924f264707625d7
treec1e3c842a16f18e46f1ed159b69069f9fbf87597
parent014e7f1d30678868964dcfbeaef278736ff932f5
c-common.c (check_format_info): Warn for non-constant format strings with strftime formats if -Wformat-nonliteral.

* 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.

From-SVN: r38105
gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format-nonlit-3.c [new file with mode: 0644]