/* Some code common to C and ObjC front ends.
- Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GCC.
if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) != NULL)
return 1;
- return DECL_DECLARED_INLINE_P (fn) && DECL_EXTERNAL (fn);
+ return (!flag_really_no_inline && DECL_DECLARED_INLINE_P (fn)
+ && DECL_EXTERNAL (fn));
}
int
{
if (do_warning)
warning ("%Jfunction '%F' can never be inlined because it "
- "is supressed using -fno-inline", fn, fn);
+ "is suppressed using -fno-inline", fn, fn);
goto cannot_inline;
}
finish_cdtor (body);
}
-
- {
- int flags;
- FILE *stream = dump_begin (TDI_all, &flags);
-
- if (stream)
- {
- dump_node (getdecls (), flags & ~TDF_SLIM, stream);
- dump_end (TDI_all, stream);
- }
- }
}
/* Called during diagnostic message formatting process to print a
pp_string (pp, n);
return true;
}
+
+tree
+c_objc_common_truthvalue_conversion (tree expr)
+{
+ retry:
+ switch (TREE_CODE (TREE_TYPE (expr)))
+ {
+ case ARRAY_TYPE:
+ expr = default_conversion (expr);
+ if (TREE_CODE (TREE_TYPE (expr)) != ARRAY_TYPE)
+ goto retry;
+
+ error ("used array that cannot be converted to pointer where scalar is required");
+ return error_mark_node;
+
+ case RECORD_TYPE:
+ error ("used struct type value where scalar is required");
+ return error_mark_node;
+
+ case UNION_TYPE:
+ error ("used union type value where scalar is required");
+ return error_mark_node;
+ default:
+ break;
+ }
+
+ return c_common_truthvalue_conversion (expr);
+}
+