aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-pure-const.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-pure-const.cc')
-rw-r--r--gcc/ipa-pure-const.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ipa-pure-const.cc b/gcc/ipa-pure-const.cc
index 058a7dd..3060ffe 100644
--- a/gcc/ipa-pure-const.cc
+++ b/gcc/ipa-pure-const.cc
@@ -292,6 +292,15 @@ warn_function_cold (tree decl)
true, warned_about, "cold");
}
+void
+warn_function_returns_nonnull (tree decl)
+{
+ static hash_set<tree> *warned_about;
+ warned_about
+ = suggest_attribute (OPT_Wsuggest_attribute_returns_nonnull, decl,
+ true, warned_about, "returns_nonnull");
+}
+
/* Check to see if the use (or definition when CHECKING_WRITE is true)
variable T is legal in a function that is either pure or const. */