[PATCH] gdb: Fix an ODR warning with byacc with GDB_YY_REMAP
Sam James
sam@gentoo.org
Tue Sep 12 00:58:11 GMT 2023
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
More information about the Gdb-patches
mailing list