diff options
author | Joseph Myers <jsm28@cam.ac.uk> | 2000-08-06 19:12:49 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2000-08-06 19:12:49 +0100 |
commit | cd7324181ab0c926357153f8031abfebc1dc8659 (patch) | |
tree | fde82f1201d096c62200c1724deb5ea25ea63afc /gcc/c-decl.c | |
parent | 470fc13d5bf498e837128848dd85c9358fafa765 (diff) | |
download | gcc-cd7324181ab0c926357153f8031abfebc1dc8659.zip gcc-cd7324181ab0c926357153f8031abfebc1dc8659.tar.gz gcc-cd7324181ab0c926357153f8031abfebc1dc8659.tar.bz2 |
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
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 6d08dfc..1f773d9 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3003,6 +3003,7 @@ init_decl_processing () Note that stddef.h uses `unsigned long', and this must agree, even if long and int are the same size. */ t = TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (SIZE_TYPE))); + signed_size_type_node = signed_type (t); if (flag_traditional && TREE_UNSIGNED (t)) t = signed_type (t); @@ -3086,6 +3087,7 @@ init_decl_processing () = build_function_type (integer_type_node, NULL_TREE); ptrdiff_type_node = TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (PTRDIFF_TYPE))); + unsigned_ptrdiff_type_node = unsigned_type (ptrdiff_type_node); c_common_nodes_and_builtins (0, flag_no_builtin, flag_no_nonansi_builtin); |