* [PATCH] [gdb/build] Fix yysymbol_kind_t odr violation
@ 2023-08-17 15:10 Tom de Vries
2023-08-18 14:22 ` Tom Tromey
0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2023-08-17 15:10 UTC (permalink / raw)
To: gdb-patches
When building gdb with -O2 -flto on openSUSE Tumbleweed (using bison 3.8.2) I
run into:
...
ada-exp.c.tmp:653: warning: type 'yysymbol_kind_t' violates the C++ One \
Definition Rule [-Wodr]
c-exp.c.tmp:398: note: an enum with different value name is defined in \
another translation unit
ada-exp.c.tmp:660: note: name 'YYSYMBOL_NULL_PTR' differs from name \
'YYSYMBOL_COMPLEX_INT' defined in another translation unit
c-exp.c.tmp:405: note: mismatching definition
...
Fix this by renaming to ada_exp_yysymbol_kind_t and likewise for other .y
files.
Tested on x86_64-linux.
PR build/22395
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395
---
gdb/Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ccdd84beea6..54c5312e19a 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2511,6 +2511,7 @@ po/$(PACKAGE).pot: force
-e 's/YY_NULL/YY_NULLPTR/g' \
-e "s/YYSTYPE/$(subst -,_,$*)_YYSTYPE/g" \
-e "s/yyalloc/$(subst -,_,$*)_yyalloc/g" \
+ -e "s/yysymbol_kind_t/$(subst -,_,$*)_yysymbol_kind_t/g" \
< $@.tmp > $@.new && \
rm -f $@.tmp && \
mv $@.new $@
base-commit: 05fbbeacaa761976fea5580d993aa6cb7f5342a0
--
2.35.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [gdb/build] Fix yysymbol_kind_t odr violation
2023-08-17 15:10 [PATCH] [gdb/build] Fix yysymbol_kind_t odr violation Tom de Vries
@ 2023-08-18 14:22 ` Tom Tromey
0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2023-08-18 14:22 UTC (permalink / raw)
To: Tom de Vries via Gdb-patches; +Cc: Tom de Vries
>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> Fix this by renaming to ada_exp_yysymbol_kind_t and likewise for other .y
Tom> files.
Tom> Tested on x86_64-linux.
Tom> PR build/22395
Tom> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395
Looks good to me.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-18 14:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17 15:10 [PATCH] [gdb/build] Fix yysymbol_kind_t odr violation Tom de Vries
2023-08-18 14:22 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).