This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Bill,the revision you converged on is, as Ian, says, just moving some interface around. That was needed to fix obj-c++.
This diff is the combination of that patch and its logical predecessor. Does reverting this diff get you back to normalcy?
nathan -- Nathan Sidwell
Index: gcc/cp/cp-lang.c =================================================================== --- gcc/cp/cp-lang.c (revision 248144) +++ gcc/cp/cp-lang.c (working copy) @@ -229,6 +229,5 @@ tree cxx_enum_underlying_base_type (cons return underlying_type; } - #include "gt-cp-cp-lang.h" #include "gtype-cp.h" Index: gcc/cp/cp-objcp-common.c =================================================================== --- gcc/cp/cp-objcp-common.c (revision 248144) +++ gcc/cp/cp-objcp-common.c (working copy) @@ -336,22 +336,6 @@ cxx_block_may_fallthru (const_tree stmt) } } -/* Return the list of decls in the global namespace. */ - -tree -cp_get_global_decls () -{ - return NAMESPACE_LEVEL (global_namespace)->names; -} - -/* Push DECL into the current scope. */ - -tree -cp_pushdecl (tree decl) -{ - return pushdecl (decl); -} - void cp_common_init_ts (void) { Index: gcc/cp/cp-objcp-common.h =================================================================== --- gcc/cp/cp-objcp-common.h (revision 248144) +++ gcc/cp/cp-objcp-common.h (working copy) @@ -31,8 +31,6 @@ extern int cp_decl_dwarf_attribute (cons extern int cp_type_dwarf_attribute (const_tree, int); extern void cp_common_init_ts (void); extern tree cp_unit_size_without_reusable_padding (tree); -extern tree cp_get_global_decls (); -extern tree cp_pushdecl (tree); /* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c, @@ -167,9 +165,4 @@ extern tree cp_pushdecl (tree); #undef LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS #define LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS cp_protect_cleanup_actions - -#undef LANG_HOOKS_GETDECLS -#define LANG_HOOKS_GETDECLS cp_get_global_decls -#undef LANG_HOOKS_PUSHDECL -#define LANG_HOOKS_PUSHDECL cp_pushdecl #endif /* GCC_CP_OBJCP_COMMON */ Index: gcc/cp/name-lookup.c =================================================================== --- gcc/cp/name-lookup.c (revision 248144) +++ gcc/cp/name-lookup.c (working copy) @@ -1872,6 +1872,16 @@ pushdecl (tree x, bool is_friend) return ret; } +/* Wrapper for non-friend version. We have to use a wrapper, rather + than default arg, as pieces of the core compiler expect this entry + point to exist. */ + +tree +pushdecl (tree x) +{ + return pushdecl (x, false); +} + /* Enter DECL into the symbol table, if that's appropriate. Returns DECL, or a modified version thereof. */ @@ -2367,6 +2377,15 @@ get_local_decls (void) return current_binding_level->names; } +/* Get the global decls. */ + +tree +getdecls (void) +{ + gcc_assert (current_binding_level == NAMESPACE_LEVEL (global_namespace)); + return current_binding_level->names; +} + /* Return how many function prototypes we are currently nested inside. */ int Index: gcc/cp/name-lookup.h =================================================================== --- gcc/cp/name-lookup.h (revision 248144) +++ gcc/cp/name-lookup.h (working copy) @@ -320,6 +320,7 @@ extern bool pushdecl_class_level (tree); extern tree pushdecl_namespace_level (tree, bool); extern bool push_class_level_binding (tree, tree); extern tree get_local_decls (); +extern tree getdecls(); extern int function_parm_depth (void); extern tree cp_namespace_decls (tree); extern void set_decl_namespace (tree, tree, bool); @@ -338,7 +339,8 @@ extern cxx_binding *outer_binding (tree, extern void cp_emit_debug_info_for_using (tree, tree); extern tree pushdecl_outermost_localscope (tree); -extern tree pushdecl (tree, bool is_friend = false); +extern tree pushdecl (tree, bool is_friend); +extern tree pushdecl (tree); extern tree pushdecl_top_level (tree, bool is_friend = false); extern tree pushdecl_top_level_and_finish (tree, tree); extern tree pushtag (tree, tree, tag_scope);
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |