aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorPaul Eggert2016-06-12 10:31:25 -0700
committerPaul Eggert2016-06-12 10:33:52 -0700
commitab182c624868fcc0ed97597db669911099d4bd28 (patch)
treee9daecdac6ee59ab21768ed529cfdf6890d96122 /src/bytecode.c
parent37f8a470d068c7dbb77fa515f09a9153b59aad35 (diff)
downloademacs-ab182c624868fcc0ed97597db669911099d4bd28.tar.gz
emacs-ab182c624868fcc0ed97597db669911099d4bd28.zip
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.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c4
1 files changed, 2 insertions, 2 deletions
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,
637 the table clearer. */ 637 the table clearer. */
638#define LABEL(OP) [OP] = &&insn_ ## OP 638#define LABEL(OP) [OP] = &&insn_ ## OP
639 639
640#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) 640#if GNUC_PREREQ (4, 6, 0)
641# pragma GCC diagnostic push 641# pragma GCC diagnostic push
642# pragma GCC diagnostic ignored "-Woverride-init" 642# pragma GCC diagnostic ignored "-Woverride-init"
643#elif defined __clang__ 643#elif defined __clang__
@@ -656,7 +656,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
656#undef DEFINE 656#undef DEFINE
657 }; 657 };
658 658
659#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) || defined __clang__ 659#if GNUC_PREREQ (4, 6, 0) || defined __clang__
660# pragma GCC diagnostic pop 660# pragma GCC diagnostic pop
661#endif 661#endif
662 662