public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/30839] New: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
@ 2023-09-11 20:02 sam at gentoo dot org
  2023-09-11 20:03 ` [Bug build/30839] " sam at gentoo dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sam at gentoo dot org @ 2023-09-11 20:02 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30839

            Bug ID: 30839
           Summary: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: sam at gentoo dot org
            Blocks: 22395
  Target Milestone: ---

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
```


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=22395
[Bug 22395] ODR violations
-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/30839] ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
  2023-09-11 20:02 [Bug build/30839] New: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp sam at gentoo dot org
@ 2023-09-11 20:03 ` sam at gentoo dot org
  2023-09-11 20:48 ` vries at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sam at gentoo dot org @ 2023-09-11 20:03 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30839

--- Comment #1 from Sam James <sam at gentoo dot org> ---
Created attachment 15108
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15108&action=edit
build.log.xz

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/30839] ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
  2023-09-11 20:02 [Bug build/30839] New: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp sam at gentoo dot org
  2023-09-11 20:03 ` [Bug build/30839] " sam at gentoo dot org
@ 2023-09-11 20:48 ` vries at gcc dot gnu.org
  2023-09-11 21:17 ` sam at gentoo dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-11 20:48 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30839

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vries at gcc dot gnu.org

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Does adding a GDB_YY_REMAP line in gdb/yy-remap.h fix it?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/30839] ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
  2023-09-11 20:02 [Bug build/30839] New: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp sam at gentoo dot org
  2023-09-11 20:03 ` [Bug build/30839] " sam at gentoo dot org
  2023-09-11 20:48 ` vries at gcc dot gnu.org
@ 2023-09-11 21:17 ` sam at gentoo dot org
  2023-09-11 21:25 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sam at gentoo dot org @ 2023-09-11 21:17 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30839

--- Comment #3 from Sam James <sam at gentoo dot org> ---
(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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/30839] ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
  2023-09-11 20:02 [Bug build/30839] New: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp sam at gentoo dot org
                   ` (2 preceding siblings ...)
  2023-09-11 21:17 ` sam at gentoo dot org
@ 2023-09-11 21:25 ` vries at gcc dot gnu.org
  2023-09-12 10:50 ` vries at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-11 21:25 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30839

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/30839] ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
  2023-09-11 20:02 [Bug build/30839] New: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp sam at gentoo dot org
                   ` (3 preceding siblings ...)
  2023-09-11 21:25 ` vries at gcc dot gnu.org
@ 2023-09-12 10:50 ` vries at gcc dot gnu.org
  2023-09-27  7:35 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-12 10:50 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30839

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2023-September/202351.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/30839] ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
  2023-09-11 20:02 [Bug build/30839] New: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp sam at gentoo dot org
                   ` (4 preceding siblings ...)
  2023-09-12 10:50 ` vries at gcc dot gnu.org
@ 2023-09-27  7:35 ` cvs-commit at gcc dot gnu.org
  2023-09-27  7:36 ` sam at gentoo dot org
  2023-09-27  7:36 ` sam at gentoo dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-27  7:35 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30839

--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
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

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/30839] ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
  2023-09-11 20:02 [Bug build/30839] New: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp sam at gentoo dot org
                   ` (5 preceding siblings ...)
  2023-09-27  7:35 ` cvs-commit at gcc dot gnu.org
@ 2023-09-27  7:36 ` sam at gentoo dot org
  2023-09-27  7:36 ` sam at gentoo dot org
  7 siblings, 0 replies; 9+ messages in thread
From: sam at gentoo dot org @ 2023-09-27  7:36 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30839

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/30839] ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
  2023-09-11 20:02 [Bug build/30839] New: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp sam at gentoo dot org
                   ` (6 preceding siblings ...)
  2023-09-27  7:36 ` sam at gentoo dot org
@ 2023-09-27  7:36 ` sam at gentoo dot org
  7 siblings, 0 replies; 9+ messages in thread
From: sam at gentoo dot org @ 2023-09-27  7:36 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30839

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #7 from Sam James <sam at gentoo dot org> ---
Fixed for 14.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2023-09-27  7:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 20:02 [Bug build/30839] New: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp sam at gentoo dot org
2023-09-11 20:03 ` [Bug build/30839] " sam at gentoo dot org
2023-09-11 20:48 ` vries at gcc dot gnu.org
2023-09-11 21:17 ` sam at gentoo dot org
2023-09-11 21:25 ` vries at gcc dot gnu.org
2023-09-12 10:50 ` vries at gcc dot gnu.org
2023-09-27  7:35 ` cvs-commit at gcc dot gnu.org
2023-09-27  7:36 ` sam at gentoo dot org
2023-09-27  7:36 ` sam at gentoo dot org

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