From ca6afc07c8abc645416bf41bb10f27c95619c83c Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Mon, 17 Jul 2017 21:32:58 +0900 Subject: [PATCH] Add version check for GCC. --- misc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc.h b/misc.h index 2f61a61..07c44c4 100644 --- a/misc.h +++ b/misc.h @@ -49,7 +49,7 @@ ssize_t my_strcpy(char *dst, ssize_t dst_len, const char *src, ssize_t src_len * With GCC, the macro CHECK_NOT_CHAR_P() causes a compilation error * when the target is pointer not a fixed array. */ -#ifdef __GNUC__ +#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 #define FUNCTION_BEGIN_MACRO ({ #define FUNCTION_END_MACRO ;}) #define CHECK_NOT_CHAR_P(t) \ -- 2.39.5