http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316

--- Comment #33 from Marc Glisse <marc.glisse at normalesup dot org> 2011-09-04 
11:03:41 UTC ---
And if you don't like errors saying that X can't be converted to X, you'll need
something like the below. I don't think I'll go much further anytime soon (if
someone else wants a go, that'd be great...).

--- cp/error.c  (revision 178506)
+++ cp/error.c  (working copy)
@@ -805,6 +805,8 @@
          pp_cxx_cv_qualifier_seq (cxx_pp, class_of_this_parm (t));
        else
          pp_cxx_cv_qualifier_seq (cxx_pp, t);
+       if (TREE_CODE (t) == FUNCTION_TYPE && TYPE_MINVAL (t))
+         pp_string (cxx_pp, " extern \"C\"");
        dump_exception_spec (TYPE_RAISES_EXCEPTIONS (t), flags);
        dump_type_suffix (TREE_TYPE (t), flags);
        break;

Reply via email to