diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 1 | ||||
-rw-r--r-- | gcc/java/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/java/class.c | 7 | ||||
-rw-r--r-- | gcc/java/expr.c | 4 | ||||
-rw-r--r-- | gcc/java/lang.c | 2 | ||||
-rw-r--r-- | gcc/objc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 1 | ||||
-rw-r--r-- | gcc/tree-inline.c | 1 | ||||
-rw-r--r-- | gcc/tree.h | 14 |
11 files changed, 43 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a26bc96..9b763f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2008-09-17 Jan Hubicka <jh@suse.cz> + + PR c++/18071 + * tree.h (DECL_INLINE): remove. + (DECL_DECLARED_INLINE_P): Update docs. + (DECL_NO_INLINE_WARNING_P): new. + (tree_function_decl): Replace inline_flag by no_inline_warning_flag. + * tree-inline.c (inlinable_function_p): Set DECL_NO_INLINE_WARNING_P. + 2008-09-17 Jakub Jelinek <jakub@redhat.com> Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a78e5f4..903f45c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2008-09-17 Jan Hubicka <jh@suse.cz> + + PR c++/18071 + * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P. + 2008-09-16 Jakub Jelinek <jakub@redhat.com> PR c++/37531 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index d699f89..f57ca87 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -12332,6 +12332,7 @@ start_method (cp_decl_specifier_seq *declspecs, check_template_shadow (fndecl); DECL_DECLARED_INLINE_P (fndecl) = 1; + DECL_NO_INLINE_WARNING_P (fndecl) = 1; /* We process method specializations in finish_struct_1. */ if (processing_template_decl && !DECL_TEMPLATE_SPECIALIZATION (fndecl)) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index c88eca6..c5a9ecf 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,11 @@ +2008-09-17 Jan Hubicka <jh@suse.cz> + + PR c++/18071 + * class.c (add_method_1): Do not initialize DECL_INLINE. + (make_local_function_alias): Likewise. + * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE. + * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE. + 2008-09-09 Richard Guenther <rguenther@suse.de> * decl.c (build_result_decl): Remove no longer applicable diff --git a/gcc/java/class.c b/gcc/java/class.c index 647da9a..13cc54e 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -795,7 +795,7 @@ add_method_1 (tree this_class, int access_flags, tree name, tree function_type) if (access_flags & ACC_PUBLIC) METHOD_PUBLIC (fndecl) = 1; if (access_flags & ACC_PROTECTED) METHOD_PROTECTED (fndecl) = 1; if (access_flags & ACC_PRIVATE) - METHOD_PRIVATE (fndecl) = DECL_INLINE (fndecl) = 1; + METHOD_PRIVATE (fndecl) = 1; if (access_flags & ACC_NATIVE) { METHOD_NATIVE (fndecl) = 1; @@ -806,9 +806,9 @@ add_method_1 (tree this_class, int access_flags, tree name, tree function_type) file. */ DECL_EXTERNAL (fndecl) = CLASS_FROM_CURRENTLY_COMPILED_P (this_class) == 0; if (access_flags & ACC_STATIC) - METHOD_STATIC (fndecl) = DECL_INLINE (fndecl) = 1; + METHOD_STATIC (fndecl) = 1; if (access_flags & ACC_FINAL) - METHOD_FINAL (fndecl) = DECL_INLINE (fndecl) = 1; + METHOD_FINAL (fndecl) = 1; if (access_flags & ACC_SYNCHRONIZED) METHOD_SYNCHRONIZED (fndecl) = 1; if (access_flags & ACC_ABSTRACT) METHOD_ABSTRACT (fndecl) = 1; if (access_flags & ACC_STRICT) METHOD_STRICTFP (fndecl) = 1; @@ -1393,7 +1393,6 @@ make_local_function_alias (tree method) TREE_PUBLIC (alias) = 0; DECL_EXTERNAL (alias) = 0; DECL_ARTIFICIAL (alias) = 1; - DECL_INLINE (alias) = 0; DECL_INITIAL (alias) = error_mark_node; TREE_ADDRESSABLE (alias) = 1; TREE_USED (alias) = 1; diff --git a/gcc/java/expr.c b/gcc/java/expr.c index ff28bbb..0882b520 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -2089,9 +2089,9 @@ rewrite_arglist_getcaller (tree arglist) tree retaddr = build_call_expr (built_in_decls[BUILT_IN_RETURN_ADDRESS], 1, integer_zero_node); - - DECL_INLINE (current_function_decl) = 0; + DECL_UNINLINABLE (current_function_decl) = 1; + return chainon (arglist, tree_cons (NULL_TREE, retaddr, NULL_TREE)); diff --git a/gcc/java/lang.c b/gcc/java/lang.c index d049aeb..af2ed80 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -845,7 +845,7 @@ static bool java_decl_ok_for_sibcall (const_tree decl) { return (decl != NULL && DECL_CONTEXT (decl) == output_class - && DECL_INLINE (decl)); + && !DECL_UNINLINABLE (decl)); } /* Given a call_expr, try to figure out what its target might be. In diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index e4f952d..1457f7f 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,9 @@ +2008-09-17 Jan Hubicka <jh@suse.cz> + + PR c++/18071 + * objc/objc-act.c (objc_finish_method_definition): Do not set + DECL_INLINE. + 2008-09-01 Aldy Hernandez <aldyh@redhat.com> * objc-act.c (build_typed_selector_reference): Pass input_location to diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 8f95719..1fd52f0 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -8800,7 +8800,6 @@ objc_finish_method_definition (tree fndecl) /* We cannot validly inline ObjC methods, at least not without a language extension to declare that a method need not be dynamically dispatched, so suppress all thoughts of doing so. */ - DECL_INLINE (fndecl) = 0; DECL_UNINLINABLE (fndecl) = 1; #ifndef OBJCPLUS diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index ebc8b32..69f0c80 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2594,6 +2594,7 @@ inlinable_function_p (tree fn) /* We only warn for functions declared `inline' by the user. */ do_warning = (warn_inline && DECL_DECLARED_INLINE_P (fn) + && !DECL_NO_INLINE_WARNING_P (fn) && !DECL_IN_SYSTEM_HEADER (fn)); always_inline = lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)); @@ -3235,17 +3235,17 @@ struct tree_decl_non_common GTY(()) #define DECL_POSSIBLY_INLINED(DECL) \ FUNCTION_DECL_CHECK (DECL)->function_decl.possibly_inlined -/* Nonzero in a FUNCTION_DECL means this function can be substituted - where it is called. */ -#define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->function_decl.inline_flag) - /* Nonzero in a FUNCTION_DECL means that this function was declared inline, such as via the `inline' keyword in C/C++. This flag controls the linkage - semantics of 'inline'; whether or not the function is inlined is - controlled by DECL_INLINE. */ + semantics of 'inline' */ #define DECL_DECLARED_INLINE_P(NODE) \ (FUNCTION_DECL_CHECK (NODE)->function_decl.declared_inline_flag) +/* Nonzero in a FUNCTION_DECL means this function should not get + -Winline warnings. */ +#define DECL_NO_INLINE_WARNING_P(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->function_decl.no_inline_warning_flag) + /* Nonzero in a FUNCTION_DECL that should be always inlined by the inliner disregarding size and cost heuristics. This is equivalent to using the always_inline attribute without the required diagnostics if the @@ -3314,7 +3314,7 @@ struct tree_function_decl GTY(()) unsigned declared_inline_flag : 1; unsigned regdecl_flag : 1; - unsigned inline_flag : 1; + unsigned no_inline_warning_flag : 1; unsigned no_instrument_function_entry_exit : 1; unsigned no_limit_stack : 1; unsigned disregard_inline_limits : 1; |