[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
c-stack: Don't use an undefined C macro
From: |
Bruno Haible |
Subject: |
c-stack: Don't use an undefined C macro |
Date: |
Thu, 15 Apr 2021 02:16:25 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-206-generic; KDE/5.18.0; x86_64; ; ) |
When compiling a Gnulib testdir on FreeBSD 13.0, with libsigsegv installed,
I see this compilation error:
../../gllib/c-stack.c:174:6: error: function-like macro '__GNUC_PREREQ' is not
defined
# if __GNUC_PREREQ (4, 6)
^
1 error generated.
This patch fixes it.
2021-04-14 Bruno Haible <bruno@clisp.org>
c-stack: Don't use an undefined C macro (regression from 2020-10-04).
* lib/c-stack.c: Test GNU C version directly, without __GNUC_PREREQ.
diff --git a/lib/c-stack.c b/lib/c-stack.c
index 50caafa..b508d82 100644
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -171,7 +171,7 @@ null_action (int signo _GL_UNUSED)
#if USE_LIBSIGSEGV
/* Pacify GCC 9.3.1, which otherwise would complain about segv_handler. */
-# if __GNUC_PREREQ (4, 6)
+# 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
# endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- c-stack: Don't use an undefined C macro,
Bruno Haible <=