diff options
| author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-02 10:51:17 +0000 |
|---|---|---|
| committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-02 10:51:17 +0000 |
| commit | eaf45f93c4ee922dbe317b8b9d7e180641fc86a8 (patch) | |
| tree | 500db6a75f62007cc54fa831988ec84ee2018489 /gcc/cp/decl.c | |
| parent | 7672950e2e134ab782ad08e15aee8acab941402e (diff) | |
| download | ppe42-gcc-eaf45f93c4ee922dbe317b8b9d7e180641fc86a8.tar.gz ppe42-gcc-eaf45f93c4ee922dbe317b8b9d7e180641fc86a8.zip | |
.:
Kill -fhonor-std.
* doc/c-tree.texi (Namespaces): Remove std & -fhonor-std
interaction.
* doc/invoke.texi (C++ Dialect Options): Remove -fno-honor-std.
cp:
Kill -fhonor-std.
* NEWS: Document.
* cp-tree.h (flag_honor_std): Remove.
(CPTI_FAKE_STD): Remove.
(std_node): Remove comment about it being NULL.
(fake_std_node): Remove.
* decl.c (in_fake_std): Remove.
(walk_namespaces_r): Remove fake_std_node check.
(push_namespace): Remove in_fake_std code.
(pop_namespace): Likewise.
(lookup_name_real): Remove fake_std_node check.
(init_decl_processing): Always create std_node. Always add
std:: things there.
(builtin_function): Always put non '_' fns in std.
* decl2.c (flag_honor_std): Remove.
(lang_f_options): Remove honor-std.
(unsupported_options): Add honor-std.
(set_decl_namespace): Remove fake_std_node check.
(validate_nonmember_using_decl): Likewise.
(do_using_directive): Likewise.
(handle_class_head): Likewise.
* dump.c (cp_dump_tree): Likewise.
* except.c (init_exception_processing): Adjust.
* init.c (build_member_call): Remove fake_std_node check.
(build_offset_ref): Likewise.
* lang-options.h: Remove -fhonor-std, -fno-honor-std.
* rtti.c (init_rtti_processing): Adjust.
testsuite:
Kill -fhonor-std.
* g++.old-deja/g++.ns/ns14.C: Remove special options.
* g++.old-deja/g++.other/std1.C: Likewise.
* g++.old-deja/g++.robertl/eb133.C: Likewise. Add using directive.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44569 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
| -rw-r--r-- | gcc/cp/decl.c | 56 |
1 files changed, 8 insertions, 48 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index c9867da5209..1a34bb9ed61 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -206,11 +206,6 @@ tree cp_global_trees[CPTI_MAX]; static tree global_type_node; -/* If non-zero, this is the number of times we have entered the `std' - namespace when we are treating that namespace as an alias for the - global namespace. */ -static int in_fake_std; - /* Expect only namespace names now. */ static int only_namespace_names; @@ -1794,12 +1789,6 @@ walk_namespaces_r (namespace, f, data) if (TREE_CODE (current) != NAMESPACE_DECL || DECL_NAMESPACE_ALIAS (current)) continue; - if (!DECL_LANG_SPECIFIC (current)) - { - /* Hmm. std. */ - my_friendly_assert (current == fake_std_node, 393); - continue; - } /* We found a namespace. */ result |= walk_namespaces_r (current, f, data); @@ -2279,13 +2268,6 @@ push_namespace (name) need_new = 0; implicit_use = 1; } - else if (current_namespace == global_namespace - && !flag_honor_std - && name == std_identifier) - { - in_fake_std++; - return; - } else { /* Check whether this is an extended namespace definition. */ @@ -2331,12 +2313,7 @@ push_namespace (name) void pop_namespace () { - if (current_namespace == global_namespace) - { - my_friendly_assert (in_fake_std > 0, 980421); - in_fake_std--; - return; - } + my_friendly_assert (current_namespace != global_namespace, 20010801); current_namespace = CP_DECL_CONTEXT (current_namespace); /* The binding level is not popped, as it might be re-opened later. */ suspend_binding_level (); @@ -5892,10 +5869,6 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only) if (looking_for_template) flags |= LOOKUP_TEMPLATES_EXPECTED; - /* std:: becomes :: for now. */ - if (got_scope && got_scope == fake_std_node) - got_scope = void_type_node; - if (got_scope) type = got_scope; else if (got_object != error_mark_node) @@ -6377,20 +6350,9 @@ init_decl_processing () declare_namespace_level (); /* Create the `std' namespace. */ - if (flag_honor_std) - { - push_namespace (std_identifier); - std_node = current_namespace; - pop_namespace (); - fake_std_node = error_mark_node; - } - else - { - fake_std_node = build_decl (NAMESPACE_DECL, - std_identifier, - void_type_node); - pushdecl (fake_std_node); - } + push_namespace (std_identifier); + std_node = current_namespace; + pop_namespace (); c_common_nodes_and_builtins (); @@ -6492,12 +6454,10 @@ init_decl_processing () tree bad_alloc_type_node, newtype, deltype; tree ptr_ftype_sizetype; - if (flag_honor_std) - push_namespace (std_identifier); + push_namespace (std_identifier); bad_alloc_type_node = xref_tag (class_type_node, get_identifier ("bad_alloc"), 1); - if (flag_honor_std) - pop_namespace (); + pop_namespace (); ptr_ftype_sizetype = build_function_type (ptr_type_node, tree_cons (NULL_TREE, @@ -6666,13 +6626,13 @@ builtin_function (name, type, code, class, libname) /* All builtins that don't begin with an `_' should go in the `std' namespace. */ - if (flag_honor_std && name[0] != '_') + if (name[0] != '_') { push_namespace (std_identifier); DECL_CONTEXT (decl) = std_node; } pushdecl (decl); - if (flag_honor_std && name[0] != '_') + if (name[0] != '_') pop_namespace (); /* Since `pushdecl' relies on DECL_ASSEMBLER_NAME instead of DECL_NAME, |

