summaryrefslogtreecommitdiff
path: root/ltp_framework/include/compiler.h
diff options
context:
space:
mode:
authorLe Chi Thu <thu2004@yahoo.se>2012-04-03 01:23:00 +0200
committerLe Chi Thu <thu2004@yahoo.se>2012-04-03 01:23:00 +0200
commit01c165cd1b2ac601d5ae73d3cb5e82ccdd94ac94 (patch)
tree777ab4b2289c860cab0b438f08e4f30bd52d9af5 /ltp_framework/include/compiler.h
Initial commit
Diffstat (limited to 'ltp_framework/include/compiler.h')
-rw-r--r--ltp_framework/include/compiler.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/ltp_framework/include/compiler.h b/ltp_framework/include/compiler.h
new file mode 100644
index 0000000..ec714fe
--- /dev/null
+++ b/ltp_framework/include/compiler.h
@@ -0,0 +1,18 @@
+/*
+ * compiler.h: take care of fun compiler details here
+ *
+ * Licensed under the GPL-2 or later
+ */
+
+#ifndef __LTP_COMPILER_H__
+#define __LTP_COMPILER_H__
+
+#define LTP_ATTRIBUTE_NORETURN __attribute__((noreturn))
+#define LTP_ATTRIBUTE_UNUSED __attribute__((unused))
+#define LTP_ATTRIBUTE_UNUSED_RESULT __attribute__((warn_unused_result))
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
+#endif
+
+#endif /* __LTP_COMPILER_H__ */