c-common.c (decl_attributes): Don't allow strftime formats with first_arg_num nonzero.
authorJoseph Myers <jsm28@cam.ac.uk>
Thu, 12 Oct 2000 09:28:52 +0000 (10:28 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Thu, 12 Oct 2000 09:28:52 +0000 (10:28 +0100)
commit9fa8f75dc90217d4682fc22454b064424b8c9497
tree10bcbca131e9d45e6679cdb46afd7506c3c47005
parent1eb1669cd401fa1365febf71fb05bc4c750e19bc
c-common.c (decl_attributes): Don't allow strftime formats with first_arg_num nonzero.

* c-common.c (decl_attributes): Don't allow strftime formats with
first_arg_num nonzero.
(check_format_info): Set wanted_type and wanted_type_name to zero
before they are possibly assigned and used.

testsuite:
* gcc.dg/format-attr-1.c: New test.

From-SVN: r36845
gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format-attr-1.c [new file with mode: 0644]