--- gcc/tree.c 2010-04-02 00:18:08 +0800 revert some code to gcc-4.5-20090521, don't emit exported inline functions +++ gcc/tree-2.c 2010-05-14 22:56:44 +0800 @@ -5377,11 +5377,6 @@ if (*no_add_attrs == false) DECL_DLLIMPORT_P (node) = 1; } - else if (TREE_CODE (node) == FUNCTION_DECL - && DECL_DECLARED_INLINE_P (node)) - /* An exported function, even if inline, must be emitted. */ - DECL_EXTERNAL (node) = 0; - /* Report error if symbol is not accessible at global scope. */ if (!TREE_PUBLIC (node) && (TREE_CODE (node) == VAR_DECL --- gcc/cp/decl2.c 2010-03-24 06:29:54 +0800 +++ gcc/cp/decl2-2.c 2010-05-14 23:00:42 +0800 @@ -1782,10 +1782,6 @@ || (DECL_ASSEMBLER_NAME_SET_P (decl) && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))) return true; - /* Functions marked "dllexport" must be emitted so that they are - visible to other DLLs. */ - if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl))) - return true; /* Otherwise, DECL does not need to be emitted -- yet. A subsequent reference to DECL might cause it to be emitted later. */ return false; --- gcc/cp/semantics.c 2010-04-02 02:48:34 +0800 +++ gcc/cp/semantics-2.c 2010-05-14 23:14:04 +0800 @@ -3447,10 +3447,8 @@ /* If the user wants us to keep all inline functions, then mark this function as needed so that finish_file will make sure to - output it later. Similarly, all dllexport'd functions must - be emitted; there may be callers in other DLLs. */ - if ((flag_keep_inline_functions && DECL_DECLARED_INLINE_P (fn)) - || lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn))) + output it later. */ + if (flag_keep_inline_functions && DECL_DECLARED_INLINE_P (fn)) mark_needed (fn); }