projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8c6b4d
)
compiler: improve gcc 4.x compile time check
author
Jens Axboe
<axboe@fb.com>
Tue, 21 Oct 2014 14:07:33 +0000
(08:07 -0600)
committer
Jens Axboe
<axboe@fb.com>
Tue, 21 Oct 2014 14:07:33 +0000
(08:07 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
compiler/compiler-gcc4.h
patch
|
blob
|
blame
|
history
diff --git
a/compiler/compiler-gcc4.h
b/compiler/compiler-gcc4.h
index f136611dd20d596290d05d50802830d313805d19..e8701cf072cbaf05fee5017c8987550a6164ae06 100644
(file)
--- a/
compiler/compiler-gcc4.h
+++ b/
compiler/compiler-gcc4.h
@@
-5,4
+5,13
@@
#define __must_check __attribute__((warn_unused_result))
#endif
+#define GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__)
+
+#if GCC_VERSION >= 40300
+#define __compiletime_warning(message) __attribute__((warning(message)))
+#define __compiletime_error(message) __attribute__((error(message)))
+#endif
+
#endif