+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>
+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
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))
+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
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;
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;
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;
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));
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
+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
/* 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
/* 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));
#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
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;