From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH] [gdb/build] Fix yysymbol_kind_t odr violation
Date: Thu, 17 Aug 2023 17:10:06 +0200 [thread overview]
Message-ID: <20230817151006.12971-1-tdevries@suse.de> (raw)
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
next reply other threads:[~2023-08-17 15:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 15:10 Tom de Vries [this message]
2023-08-18 14:22 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230817151006.12971-1-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).