aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile/guile-internal.h
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-10-19 08:01:59 +0200
committerTom de Vries <tdevries@suse.de>2024-10-19 08:01:59 +0200
commit3173529d7decb91711f19a06eee54475683a1783 (patch)
tree4e90431e2b570746fb69e0571ff2cc5d70c35571 /gdb/guile/guile-internal.h
parentcd05f8d44dd3a11b753a11ef5f8e36dcf4a379f5 (diff)
downloadgdb-3173529d7decb91711f19a06eee54475683a1783.zip
gdb-3173529d7decb91711f19a06eee54475683a1783.tar.gz
gdb-3173529d7decb91711f19a06eee54475683a1783.tar.bz2
[gdb/guile, c++20] Work around Werror=volatile in libguile.h
When building gdb with -std=c++20, I run into: ... In file included from /usr/include/guile/2.0/libguile/__scm.h:479, from /usr/include/guile/2.0/libguile.h:31, from /data/vries/gdb/src/gdb/guile/guile-internal.h:30, from /data/vries/gdb/src/gdb/guile/guile.c:37: /usr/include/guile/2.0/libguile/gc.h: In function ‘scm_unused_struct* \ scm_cell(scm_t_bits, scm_t_bits)’: /usr/include/guile/2.0/libguile/tags.h:98:63: error: using value of \ assignment with ‘volatile’-qualified left operand is deprecated \ [-Werror=volatile] 98 | # define SCM_UNPACK(x) ((scm_t_bits) (0? (*(volatile SCM *)0=(x)): x)) | ~~~~~~~~~~~~~~~~~~~^~~~~ ... This was reported upstream [1]. Work around this by using SCM_DEBUG_TYPING_STRICTNESS == 0 instead of the default SCM_DEBUG_TYPING_STRICTNESS == 1. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com> PR guile/30767 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30767 [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65333
Diffstat (limited to 'gdb/guile/guile-internal.h')
-rw-r--r--gdb/guile/guile-internal.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h
index dea7884..9b9bb21 100644
--- a/gdb/guile/guile-internal.h
+++ b/gdb/guile/guile-internal.h
@@ -27,10 +27,17 @@
#include "hashtab.h"
#include "extension-priv.h"
#include "symtab.h"
-#include "libguile.h"
#include "objfiles.h"
#include "top.h"
+#if __cplusplus >= 202002L
+/* Work around Werror=volatile in SCM_UNPACK for
+ SCM_DEBUG_TYPING_STRICTNESS == 1. Reported upstream:
+ https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65333 . */
+#define SCM_DEBUG_TYPING_STRICTNESS 0
+#endif
+#include "libguile.h"
+
struct block;
struct frame_info;
struct objfile;