diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-06 18:12:49 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-06 18:12:49 +0000 |
commit | 428a1c21f8df9e3a70afdcd270f660d63e8b7cb3 (patch) | |
tree | fde82f1201d096c62200c1724deb5ea25ea63afc /gcc/c-decl.c | |
parent | 0ac75c1f244739b275db1941ae24b3bb0dbbb0bc (diff) | |
download | gcc-428a1c21f8df9e3a70afdcd270f660d63e8b7cb3.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35530 138bc75d-0d04-0410-961f-82ee72b054a4
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 6d08dfc2502..1f773d92107 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); |