summaryrefslogtreecommitdiff
path: root/lib/regex_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/regex_internal.h')
-rw-r--r--lib/regex_internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index f5c3125fbd..704d1cc9d6 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -851,4 +851,12 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
}
#endif /* RE_ENABLE_I18N */
+#if __GNUC_PREREQ (3,4)
+# undef __attribute_warn_unused_result__
+# define __attribute_warn_unused_result__ \
+ __attribute__ ((__warn_unused_result__))
+#else
+# define __attribute_warn_unused_result__ /* empty */
+#endif
+
#endif /* _REGEX_INTERNAL_H */