summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/basedefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/include/rtems/score/basedefs.h')
-rw-r--r--cpukit/score/include/rtems/score/basedefs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h
index 24a56f2f51..7e691b579d 100644
--- a/cpukit/score/include/rtems/score/basedefs.h
+++ b/cpukit/score/include/rtems/score/basedefs.h
@@ -210,6 +210,17 @@
#define RTEMS_UNREACHABLE() _Assert_Unreachable()
#endif
+/**
+ * @brief Tells the compiler that this function expects printf()-like
+ * arguments.
+ */
+#if defined(__GNUC__)
+ #define RTEMS_PRINTFLIKE( _format_pos, _ap_pos ) \
+ __attribute__((__format__(__printf__, _format_pos, _ap_pos)))
+#else
+ #define RTEMS_PRINTFLIKE( _format_pos, _ap_pos )
+#endif
+
#if __cplusplus >= 201103L
#define RTEMS_STATIC_ASSERT(cond, msg) \
static_assert(cond, # msg)