summaryrefslogtreecommitdiff
path: root/gcc/c-common.h
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-06 18:12:49 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-06 18:12:49 +0000
commit428a1c21f8df9e3a70afdcd270f660d63e8b7cb3 (patch)
treefde82f1201d096c62200c1724deb5ea25ea63afc /gcc/c-common.h
parent0ac75c1f244739b275db1941ae24b3bb0dbbb0bc (diff)
downloadgcc-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-common.h')
-rw-r--r--gcc/c-common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 9033a3ada39..50823df10f7 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -92,6 +92,8 @@ enum c_tree_index
CTI_SIGNED_WCHAR_TYPE,
CTI_UNSIGNED_WCHAR_TYPE,
CTI_WINT_TYPE,
+ CTI_SIGNED_SIZE_TYPE, /* For format checking only. */
+ CTI_UNSIGNED_PTRDIFF_TYPE, /* For format checking only. */
CTI_WIDEST_INT_LIT_TYPE,
CTI_WIDEST_UINT_LIT_TYPE,
@@ -124,6 +126,8 @@ enum c_tree_index
#define signed_wchar_type_node c_global_trees[CTI_SIGNED_WCHAR_TYPE]
#define unsigned_wchar_type_node c_global_trees[CTI_UNSIGNED_WCHAR_TYPE]
#define wint_type_node c_global_trees[CTI_WINT_TYPE]
+#define signed_size_type_node c_global_trees[CTI_SIGNED_SIZE_TYPE]
+#define unsigned_ptrdiff_type_node c_global_trees[CTI_UNSIGNED_PTRDIFF_TYPE]
#define widest_integer_literal_type_node c_global_trees[CTI_WIDEST_INT_LIT_TYPE]
#define widest_unsigned_literal_type_node c_global_trees[CTI_WIDEST_UINT_LIT_TYPE]