aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2004-06-10 10:08:02 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2004-06-10 10:08:02 +0200
commit498c0f2757190a22826576174616ab2403e2f4f6 (patch)
tree0a102b64a167175eaefe13e2f8dbae8fe19d5fd4 /gcc/tree.h
parent618df7453e19213478c14873470d6efa760fcc7d (diff)
downloadgcc-498c0f2757190a22826576174616ab2403e2f4f6.zip
gcc-498c0f2757190a22826576174616ab2403e2f4f6.tar.gz
gcc-498c0f2757190a22826576174616ab2403e2f4f6.tar.bz2
re PR c++/14791 (13070 does not fix -Wformat with fprintf)
PR c++/14791 * tree.h (enum tree_index): Add TI_FILEPTR_TYPE. (fileptr_type_node): Define. * tree.c (build_common_tree_nodes_2): Initialize fileptr_type_node to ptr_type_node. * c-common.c (c_common_nodes_and_builtins): For C++, make fileptr_type_node a distinct type copy. * builtin-types.def (BT_FILEPTR, BT_FN_INT_CONST_STRING_FILEPTR, BT_FN_INT_INT_FILEPTR, BT_FN_INT_FILEPTR_CONST_STRING_VALIST_ARG, BT_FN_SIZE_CONST_PTR_SIZE_SIZE_FILEPTR, BT_FN_INT_FILEPTR_CONST_STRING_VAR): Add. (BT_FN_INT_CONST_STRING_PTR, BT_FN_INT_INT_PTR, BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR, BT_FN_INT_PTR_CONST_STRING_VAR, BT_FN_INT_PTR_CONST_STRING_VALIST_ARG): Remove. * builtins.def (BUILT_IN_FPRINTF, BUILT_IN_FPRINTF_UNLOCKED, BUILT_IN_FPUTC, BUILT_IN_FPUTC_UNLOCKED, BUILT_IN_FPUTS, BUILT_IN_FPUTS_UNLOCKED, BUILT_IN_FSCANF, BUILT_IN_FWRITE, BUILT_IN_FWRITE_UNLOCKED, BUILT_IN_VFPRINTF, BUILT_IN_VFSCANF): Use the above *FILEPTR* types instead of *PTR*. * decl.c (duplicate_decls): Handle fileptr_type_node arguments specially. * g++.dg/opt/builtins1.C: New test. From-SVN: r82902
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 8cdcd92..e867302 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2508,6 +2508,7 @@ enum tree_index
TI_PTRDIFF_TYPE,
TI_VA_LIST_TYPE,
TI_BOOLEAN_TYPE,
+ TI_FILEPTR_TYPE,
TI_VOID_LIST_NODE,
@@ -2572,6 +2573,8 @@ extern GTY(()) tree global_trees[TI_MAX];
#define pid_type_node global_trees[TI_PID_TYPE]
#define ptrdiff_type_node global_trees[TI_PTRDIFF_TYPE]
#define va_list_type_node global_trees[TI_VA_LIST_TYPE]
+/* The C type `FILE *'. */
+#define fileptr_type_node global_trees[TI_FILEPTR_TYPE]
#define boolean_type_node global_trees[TI_BOOLEAN_TYPE]
#define boolean_false_node global_trees[TI_BOOLEAN_FALSE]