This is an automated email from the git hooks/post-receive script.
unknown user pushed a commit to branch aoliva/libcp1 in repository gcc.
commit cc292630db8e36c5d7d73ffae5addd5dbf9d9355 Author: Alexandre Oliva aoliva@redhat.com Date: Fri May 22 06:07:17 2015 -0300
Fix function overloads. Simplify plugin_bind.
_gdb_expr is extern C, which makes C the current language, which causes decls created within to be regarded as extern C as well, so overloading is not possible. I'm overriding the lang setting for now, but if my plan goes through, the oracle will run get a different context that will make C++ the current language.
While looking into this, I have simplified decl binding, so that changes to the C++ front-end can be reverted, since no internal functions are used any more. --- libcc1/libcp1plugin.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index d888b0a..543dc4c 100644 --- a/libcc1/libcp1plugin.cc +++ b/libcc1/libcp1plugin.cc @@ -433,6 +433,7 @@ plugin_build_decl (cc1_plugin::connection *self, { decl = build_lang_decl (code, identifier, sym_type); DECL_SOURCE_LOCATION (decl) = loc; + SET_DECL_LANGUAGE (decl, lang_cplusplus); // FIXME: current_lang_name is lan [...] } else decl = build_decl (loc, code, identifier, sym_type); @@ -471,7 +472,15 @@ plugin_bind (cc1_plugin::connection *, gcc_decl decl_in, int is_global) { tree decl = convert_in (decl_in); - cp_bind (DECL_SOURCE_LOCATION (decl), decl, is_global); + + if (is_global) + push_nested_namespace (global_namespace); + + pushdecl_maybe_friend (decl, false); + + if (is_global) + pop_nested_namespace (global_namespace); + rest_of_decl_compilation (decl, is_global, 0); return 1; }