.\" @DEPRECATED
.\" @EXECL_LIKE
.\" @IGNORABLE
+.\" @MUST_CHECK
.\" @NORETURN
.\" @PRINTF_LIKE
.\" @SCANF_LIKE
.BI "DEPRECATED(" msg ")"
.BI "EXECL_LIKE(" ntrail ")"
.BI "IGNORABLE"
+.BI "MUST_CHECK"
.BI "NORETURN"
.BI "PRINTF_LIKE(" fmt-index ", " arg-index ")"
.BI "SCANF_LIKE(" fmt-index ", " arg-index ")"
definition unused.
.PP
A function marked as
+.B MUST_CHECK
+returns an important value: a warning may be issued if a caller
+ignores the value. The return type must not be
+.BR void .
+.PP
+A function marked as
.B NORETURN
must not return. It must have return type
.BR void .
# define IGNORABLE __attribute__((__unused__))
#endif
+#if GCC_VERSION_P(3, 4) || CLANG_VERSION_P(3, 3)
+# define MUST_CHECK __attribute__((__warn_unused_result__))
+#endif
+
#if GCC_VERSION_P(4, 5) || CLANG_VERSION_P(3, 3)
# define DEPRECATED(msg) __attribute__((__deprecated__(msg)))
#elif GCC_VERSION_P(3, 1)
# define IGNORABLE
#endif
+#ifndef MUST_CHECK
+# define MUST_CHECK
+#endif
+
#ifndef GCC_WARNING
# define GCC_WARNING(warn)
#endif