]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-common.h
c-common.h (enum c_tree_index): Add CTI_SIGNED_SIZE_TYPE and CTI_UNSIGNED_PTRDIFF_TYPE.
authorJoseph Myers <jsm28@cam.ac.uk>
Sun, 6 Aug 2000 18:12:49 +0000 (19:12 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sun, 6 Aug 2000 18:12:49 +0000 (19:12 +0100)
commitcd7324181ab0c926357153f8031abfebc1dc8659
treefde82f1201d096c62200c1724deb5ea25ea63afc
parent470fc13d5bf498e837128848dd85c9358fafa765
c-common.h (enum c_tree_index): Add CTI_SIGNED_SIZE_TYPE and CTI_UNSIGNED_PTRDIFF_TYPE.

* c-common.h (enum c_tree_index): Add CTI_SIGNED_SIZE_TYPE and
CTI_UNSIGNED_PTRDIFF_TYPE.
(signed_size_type_node): Define.
(unsigned_ptrdiff_type_node): Define.
* c-decl.c (init_decl_processing): Create the
signed_size_type_node and unsigned_ptrdiff_type_node types.
* c-common.c (T_SC): Define.
(T_SST): Define.
(T_UPD): Define.
(print_char_table): Use T_SST for %zd, %zi, %zn.  Use T_UPD for
%to, %tu, %tx, %tX.  Allow %hhn (T_SC).  Add "c" to the flags for
%s and %p.
(scan_char_table): Use T_SC for %hhd, %hhi, %hhn.  Use T_SST for
%zd, %zi, %zn.  Use T_UPD for %to, %tu, %tx, %tX.  Add "c" to the
flags for %c, %s and %[.
(check_format_info): Only allow leniency for signedness of targets
of character pointers (when pedantic) for formats flagged with
"c", so for strings but not for %hh formats.  When pedantic, don't
allow character pointers to substitute for void pointers if a
second level of indirection is present.

testsuite:
* gcc.dg/c99-printf-1.c: New test.

From-SVN: r35530
gcc/ChangeLog
gcc/c-common.c
gcc/c-common.h
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c99-printf-1.c [new file with mode: 0644]