aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-10-18 18:59:04 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-10-18 18:59:04 +0000
commit6bcedb4e1cdc77c336e1742cdcff7f89ecbbb660 (patch)
tree549802a7ccf67eda822a46929952ac0b0725f86e /gcc/cp/cp-tree.h
parent989b26a751281908472e10913d6187dbb8dae7a9 (diff)
downloadgcc-6bcedb4e1cdc77c336e1742cdcff7f89ecbbb660.zip
gcc-6bcedb4e1cdc77c336e1742cdcff7f89ecbbb660.tar.gz
gcc-6bcedb4e1cdc77c336e1742cdcff7f89ecbbb660.tar.bz2
c-common.h (flag_no_builtin): Declare.
* c-common.h (flag_no_builtin): Declare. (flag_no_nonansi_builtin): Likewise. (c_common_nodes_and_builtins): Change prototype. * c-common.c (flag_no_builtin): New variable. (flag_no_nonansi_builtin): Likewise. (c_common_nodes_and_builtins): Remove parameters. Adjust accordingly. * c-decl.c (flag_no_builtin): Remove. (flag_no_nonansi_builtin): Likewise. (init_decl_processing): Adjust call to c_common_nodes_and_builtins. * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD. (fake_std_node): New macro. * decl.c (in_std): Rename to ... (in_fake_std): ... this. (flag_no_builtin): Remove. (flag_no_nonansi_builtin): Likewise. (walk_namespaces_r): Use fake_std_node. (push_namespace): Use std_identifier. (pop_namespace): Use in_fake_std. (lookup_name_real): Use fake_std_node. (init_decl_processing): When -fhonor-std, create the `std' namespace. Don't create a dummy fake_std_node in that case. Adjust call to c_common_nodes_and_builtins. Use std_identifier. (builtin_function): Put builtins whose names don't begin with `_' in the std namespace. * decl2.c (flag_no_builtin): Remove. (flag_no_nonansi_builtin): Likewise. (set_decl_namespace): Use fake_std_node. (validate_nonmember_using_decl): Likewise. (do_using_directive): Likewise. (handle_class_head): Likewise. * dump.c (dequeue_and_dump): Likewise. * except.c (init_exception_processing): Use std_identifier. * init.c (build_member_call): Use fake_std_node. * rtti.c (init_rtti_processing): Use std_identifier. From-SVN: r36940
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 689c859..ed25a8f 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -586,6 +586,7 @@ enum cp_tree_index
CPTI_VTBL_TYPE,
CPTI_VTBL_PTR_TYPE,
CPTI_STD,
+ CPTI_FAKE_STD,
CPTI_ABI,
CPTI_TYPE_INFO_TYPE,
CPTI_TINFO_DECL_ID,
@@ -679,7 +680,14 @@ extern tree cp_global_trees[CPTI_MAX];
#define unknown_type_node cp_global_trees[CPTI_UNKNOWN_TYPE]
#define vtbl_type_node cp_global_trees[CPTI_VTBL_TYPE]
#define vtbl_ptr_type_node cp_global_trees[CPTI_VTBL_PTR_TYPE]
+/* When the `std' namespace is a real namespace, this is the
+ corresponding NAMESPACE_DECL. When the `std' namespace is an alias
+ for the global namespace, this is NULL_TREE. */
#define std_node cp_global_trees[CPTI_STD]
+/* When the `std' namespace is a real namespace, this is the
+ ERROR_MARK_NODE. Otherwise, this is a dummy NAMESPACE_DECL that
+ should be treated like the global namespace. */
+#define fake_std_node cp_global_trees[CPTI_FAKE_STD]
#define abi_node cp_global_trees[CPTI_ABI]
#define type_info_type_node cp_global_trees[CPTI_TYPE_INFO_TYPE]
#define tinfo_decl_id cp_global_trees[CPTI_TINFO_DECL_ID]
@@ -744,7 +752,6 @@ extern tree cp_global_trees[CPTI_MAX];
#define cp_push_exception_identifier cp_global_trees[CPTI_PUSH_EXCEPTION_IDENTIFIER]
/* The name of the std namespace. */
#define std_identifier cp_global_trees[CPTI_STD_IDENTIFIER]
-
#define lang_name_c cp_global_trees[CPTI_LANG_NAME_C]
#define lang_name_cplusplus cp_global_trees[CPTI_LANG_NAME_CPLUSPLUS]
#define lang_name_java cp_global_trees[CPTI_LANG_NAME_JAVA]