From 01c165cd1b2ac601d5ae73d3cb5e82ccdd94ac94 Mon Sep 17 00:00:00 2001 From: Le Chi Thu Date: Tue, 3 Apr 2012 01:23:00 +0200 Subject: Initial commit --- ltp_framework/include/compiler.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ltp_framework/include/compiler.h (limited to 'ltp_framework/include/compiler.h') 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__ */ -- cgit v1.2.3