From ab182c624868fcc0ed97597db669911099d4bd28 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 12 Jun 2016 10:31:25 -0700 Subject: New macro GNUC_PREREQ for GCC version * src/conf_post.h (GNUC_PREREQ): New macro. Change uses of __GNUC_MINOR__ and __GNUC_PATCHLEVEL__ to use this macro instead, for clarity and consistency. (PRINTF_ARCHETYPE): New macro. Define it to __gnu_printf__ only if glibc, since non-GNU platforms don’t necessarily support GNU printf formats. (ATTRIBUTE_FORMAT_PRINTF): Use it. --- src/bytecode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bytecode.c') diff --git a/src/bytecode.c b/src/bytecode.c index fb9f617b514..c9e4a25dfa6 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -637,7 +637,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, the table clearer. */ #define LABEL(OP) [OP] = &&insn_ ## OP -#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +#if GNUC_PREREQ (4, 6, 0) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Woverride-init" #elif defined __clang__ @@ -656,7 +656,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, #undef DEFINE }; -#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) || defined __clang__ +#if GNUC_PREREQ (4, 6, 0) || defined __clang__ # pragma GCC diagnostic pop #endif -- cgit v1.2.1