From today at commit 9a343d2bb57c4555dedad9b43907aeeda7b51dae: ``` ada-exp.c.tmp:1747:3: error: type 'struct YYSTACKDATA' violates the C++ One Definition Rule [-Werror=odr] c-exp.c.tmp:3936:3: note: a different type is defined in another translation unit ada-exp.c.tmp:1741:23: note: the first difference of corresponding definitions is field 'l_base' c-exp.c.tmp:3930:21: note: a field of same name but different type is defined in another translation unit ada-exp.c.tmp:1747:3: note: type name 'ada_exp_YYSTYPE' should match type name 'c_exp_YYSTYPE' lto1: some warnings being treated as errors lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-g++ returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status ```
Created attachment 15108 [details] build.log.xz
Does adding a GDB_YY_REMAP line in gdb/yy-remap.h fix it?
(In reply to Tom de Vries from comment #2) > Does adding a GDB_YY_REMAP line in gdb/yy-remap.h fix it? Yeah, it does (this is with byacc, btw). ``` 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. */ ``` seems to work?
Cool. Then(In reply to Sam James from comment #3) > (In reply to Tom de Vries from comment #2) > > Does adding a GDB_YY_REMAP line in gdb/yy-remap.h fix it? > > Yeah, it does (this is with byacc, btw). > Nice, thanks. I guess you could commit as obvious. > ``` > 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. */ > > ``` > seems to work?
https://sourceware.org/pipermail/gdb-patches/2023-September/202351.html
The master branch has been updated by Sam James <sjames@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=df940f8bb348cf90445195ed4a34cddf9af634f6 commit df940f8bb348cf90445195ed4a34cddf9af634f6 Author: Sam James <sam@gentoo.org> Date: Tue Sep 12 01:46:51 2023 +0100 gdb: Fix an ODR warning with byacc with GDB_YY_REMAP 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 Approved-By: Tom de Vries <tdevries@suse.de> Copyright-paperwork-exempt: yes
Fixed for 14.