diff options
author | Lancelot SIX <lancelot.six@amd.com> | 2024-06-18 09:29:14 +0100 |
---|---|---|
committer | Lancelot SIX <lancelot.six@amd.com> | 2024-06-19 15:09:04 +0100 |
commit | ea4e03c0a9f5ed8574dcaa434cd979a6f92f5c1f (patch) | |
tree | 20c27de300c0135a3f27ba2058984bf4b490d3b2 /gdb/ChangeLog-2005 | |
parent | 5445d7819ba0c00249939d1316e344f01a403607 (diff) | |
download | gdb-ea4e03c0a9f5ed8574dcaa434cd979a6f92f5c1f.zip gdb-ea4e03c0a9f5ed8574dcaa434cd979a6f92f5c1f.tar.gz gdb-ea4e03c0a9f5ed8574dcaa434cd979a6f92f5c1f.tar.bz2 |
gdb/python/python-internal.h: avoid uninitialized constexpr
The following recent change introduced a regression when building using
clang++:
commit 764af878259768bb70c65bdf3f3285c2d6409bbd
Date: Wed Jun 12 18:58:49 2024 +0200
[gdb/python] Add typesafe wrapper around PyObject_CallMethod
The error message is:
../../gdb/python/python-internal.h:151:16: error: default initialization of an object of const type 'const char'
constexpr char gdbpy_method_format;
^
= '\0'
CXX python/py-block.o
1 error generated.
make[2]: *** [Makefile:1959: python/py-arch.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../../gdb/python/py-auto-load.c:25:
../../gdb/python/python-internal.h:151:16: error: default initialization of an object of const type 'const char'
constexpr char gdbpy_method_format;
^
= '\0'
1 error generated.
make[2]: *** [Makefile:1959: python/py-auto-load.o] Error 1
In file included from ../../gdb/python/py-block.c:23:
../../gdb/python/python-internal.h:151:16: error: default initialization of an object of const type 'const char'
constexpr char gdbpy_method_format;
^
= '\0'
1 error generated.
This patch fixes this by changing gdbpy_method_format to be a templated
struct, and only have its specializations define the static constexpr
member "format". This way, we avoid having an uninitialized constexpr
expression, regardless of it being instantiated or not.
Reviewed-By: Tom de Vries <tdevries@suse.de>
Change-Id: I5bec241144f13500ef78daea30f00d01e373692d
Diffstat (limited to 'gdb/ChangeLog-2005')
0 files changed, 0 insertions, 0 deletions