aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/system.h6
-rw-r--r--gcc/tree.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/system.h b/gcc/system.h
index b0f3f1d..6f6ab61 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -789,6 +789,12 @@ extern void fancy_abort (const char *, int, const char *)
#define ALWAYS_INLINE inline
#endif
+#if GCC_VERSION >= 3004
+#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
+#else
+#define WARN_UNUSED_RESULT
+#endif
+
/* Use gcc_unreachable() to mark unreachable locations (like an
unreachable default case of a switch. Do not use gcc_assert(0). */
#if (GCC_VERSION >= 4005) && !ENABLE_ASSERT_CHECKING
diff --git a/gcc/tree.h b/gcc/tree.h
index 684be10..9a713cd 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1214,7 +1214,7 @@ get_expr_source_range (tree expr)
extern void protected_set_expr_location (tree, location_t);
extern void protected_set_expr_location_if_unset (tree, location_t);
-extern tree maybe_wrap_with_location (tree, location_t);
+WARN_UNUSED_RESULT extern tree maybe_wrap_with_location (tree, location_t);
extern int suppress_location_wrappers;