X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=compiler%2Fcompiler-gcc4.h;h=e8701cf072cbaf05fee5017c8987550a6164ae06;hb=64666f8fe2242cbe4d804df2305924a9e43e8699;hp=bb9cc7c555130676e85d2f9b1550fdebc53e9f3f;hpb=317b95d07d4921d2594a1be6e014c9c2d062fe75;p=fio.git diff --git a/compiler/compiler-gcc4.h b/compiler/compiler-gcc4.h index bb9cc7c5..e8701cf0 100644 --- a/compiler/compiler-gcc4.h +++ b/compiler/compiler-gcc4.h @@ -1,6 +1,17 @@ #ifndef FIO_COMPILER_GCC4_H #define FIO_COMPILER_GCC4_H +#ifndef __must_check #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