public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb: Fix an ODR warning with byacc with GDB_YY_REMAP
@ 2023-09-12  0:58 Sam James
  2023-09-12 10:49 ` Tom de Vries
  2023-09-12 13:03 ` Tom de Vries
  0 siblings, 2 replies; 10+ messages in thread
From: Sam James @ 2023-09-12  0:58 UTC (permalink / raw)
  To: gdb-patches; +Cc: Sam James, Tom de Vries

With byacc, we get an ODR warning with YYSTACKDATA between ada-exp.c.tmp
and c-exp.c.tmp. Just include it in the list of symbols we rename.

PR gdb/30839

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30839
Acked-by: Tom de Vries <vries@gcc.gnu.org>
Signed-off-by: Sam James <sam@gentoo.org>
---

Few notes:
- Tom commented that it probably constitutes obvious but while I have binutils
  access, I'm not listed in gdb/MAINTAINERS for write-after-approval, so I'm
  hesitant.

- The top of yy-remap.h does mention that we should fix yacc impls which emit
  symbols that clash that aren't in the list, but meh. I'm not sure we've even
  stuck to that rule for the other symbols, and the list is already for non-Bison
  anyway...

 gdb/yy-remap.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/yy-remap.h b/gdb/yy-remap.h
index 33bee0fabdb..d0125b9ed45 100644
--- a/gdb/yy-remap.h
+++ b/gdb/yy-remap.h
@@ -85,6 +85,7 @@
 #define yystacksize	GDB_YY_REMAP (yystacksize)
 #define yyvs		GDB_YY_REMAP (yyvs)
 #define yyvsp		GDB_YY_REMAP (yyvsp)
+#define YYSTACKDATA	GDB_YY_REMAP (YYSTACKDATA)
 
 /* The following are common to all parsers.  */
 
-- 
2.42.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-09-29  4:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12  0:58 [PATCH] gdb: Fix an ODR warning with byacc with GDB_YY_REMAP Sam James
2023-09-12 10:49 ` Tom de Vries
2023-09-12 13:03 ` Tom de Vries
2023-09-26 13:48   ` Tom Tromey
2023-09-26 13:57     ` Tom de Vries
2023-09-27  7:35       ` Sam James
2023-09-27  7:52         ` Tom de Vries
2023-09-28  2:56           ` Sam James
2023-09-28  8:30             ` Tom de Vries
2023-09-29  4:37               ` Sam James

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).