Add version check for GCC.
authorHiroshi Inoue <h-inoue@dream.email.ne.jp>
Mon, 17 Jul 2017 12:32:58 +0000 (21:32 +0900)
committerHiroshi Inoue <h-inoue@dream.email.ne.jp>
Mon, 17 Jul 2017 12:32:58 +0000 (21:32 +0900)
misc.h

diff --git a/misc.h b/misc.h
index 2f61a6151cc910c43f1625707d2a99285da809b3..07c44c4ee8d2856211a7e39a6576257335f43c97 100644 (file)
--- 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) \