Bug 30767 - [gdb/guile, build, c++20] Werror=volatile in SCM_UNPACK
Summary: [gdb/guile, build, c++20] Werror=volatile in SCM_UNPACK
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: guile (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-15 18:25 UTC by Tom de Vries
Modified: 2023-08-16 06:51 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2023-08-15 18:25:10 UTC
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))
      |                                            ~~~~~~~~~~~~~~~~~~~^~~~~
...
Comment 1 Tom Tromey 2023-08-15 21:36:18 UTC
The code can't be run so it is probably just some syntactic check.
Anyway it should be reported to Guile.
Comment 2 Tom de Vries 2023-08-16 06:51:13 UTC
(In reply to Tom Tromey from comment #1)
> The code can't be run so it is probably just some syntactic check.

It is, this is with the default SCM_DEBUG_TYPING_STRICTNESS == 1, I suppose if needed we could work around this by defining to 2 or 0.

See https://fossies.org/linux/guile/libguile/scm.h

> Anyway it should be reported to Guile.

Done.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65333