public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
@ 2021-01-09 17:18 ` tromey at sourceware dot org
  2021-03-11 19:47 ` tromey at sourceware dot org
                   ` (29 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2021-01-09 17:18 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|compile                     |build
                 CC|                            |tromey at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
The 'compile' component refers to the 'compile' feature, not building gdb.

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
  2021-01-09 17:18 ` [Bug build/22395] ODR violations tromey at sourceware dot org
@ 2021-03-11 19:47 ` tromey at sourceware dot org
  2021-03-12 17:03 ` cbiesinger at google dot com
                   ` (28 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2021-03-11 19:47 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-03-11
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
I got bit debugging an ODR problem in gdb today.
I'd accidentally given a struct a name that was already in use.
This would be nice to fix.

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
  2021-01-09 17:18 ` [Bug build/22395] ODR violations tromey at sourceware dot org
  2021-03-11 19:47 ` tromey at sourceware dot org
@ 2021-03-12 17:03 ` cbiesinger at google dot com
  2021-03-12 17:46 ` palves at redhat dot com
                   ` (27 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: cbiesinger at google dot com @ 2021-03-12 17:03 UTC (permalink / raw)
  To: gdb-prs

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

Christian Biesinger <cbiesinger at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cbiesinger at google dot com

--- Comment #4 from Christian Biesinger <cbiesinger at google dot com> ---
When using gold as the linker, could try --detect-odr-violations

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-03-12 17:03 ` cbiesinger at google dot com
@ 2021-03-12 17:46 ` palves at redhat dot com
  2021-03-12 18:29 ` tromey at sourceware dot org
                   ` (26 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: palves at redhat dot com @ 2021-03-12 17:46 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from Pedro Alves <palves at redhat dot com> ---
(In reply to Tom Tromey from comment #3)
> I got bit debugging an ODR problem in gdb today.
> I'd accidentally given a struct a name that was already in use.
> This would be nice to fix.

Note that in C, it's valid to have different definitions of structures in
different translation units.  If GDB isn't coping with that, then I'd say it's
a GDB bug.

(Not saying we shouldn't fix the ODR violation, of course.)

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-03-12 17:46 ` palves at redhat dot com
@ 2021-03-12 18:29 ` tromey at sourceware dot org
  2021-03-12 18:58 ` schwab@linux-m68k.org
                   ` (25 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2021-03-12 18:29 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Pedro Alves from comment #5)
> (In reply to Tom Tromey from comment #3)
> > I got bit debugging an ODR problem in gdb today.
> > I'd accidentally given a struct a name that was already in use.
> > This would be nice to fix.
> 
> Note that in C, it's valid to have different definitions of structures in
> different translation units.  If GDB isn't coping with that, then I'd say
> it's a GDB bug.
> 
> (Not saying we shouldn't fix the ODR violation, of course.)

What happened was that I accidentally introduced a violation into gdb.
The code was working for a while, but then I added another field to
the structure in question, and I was puzzled because vector.push_back was
crashing.  It took me a while to figure out why this could possibly
be happening.

I don't know if -Wodr would really catch this though.

(In reply to Christian Biesinger from comment #4)
> When using gold as the linker, could try --detect-odr-violations

I tried this just now but it didn't report anything.
That seems incorrect though.

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-03-12 18:29 ` tromey at sourceware dot org
@ 2021-03-12 18:58 ` schwab@linux-m68k.org
  2022-03-06 17:10 ` tromey at sourceware dot org
                   ` (24 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: schwab@linux-m68k.org @ 2021-03-12 18:58 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #7 from Andreas Schwab <schwab@linux-m68k.org> ---
-Wodr works together with -flto.

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2021-03-12 18:58 ` schwab@linux-m68k.org
@ 2022-03-06 17:10 ` tromey at sourceware dot org
  2022-03-06 17:11 ` tromey at sourceware dot org
                   ` (23 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2022-03-06 17:10 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ahajkova at redhat dot com

--- Comment #8 from Tom Tromey <tromey at sourceware dot org> ---
*** Bug 28444 has been marked as a duplicate of this bug. ***

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2022-03-06 17:10 ` tromey at sourceware dot org
@ 2022-03-06 17:11 ` tromey at sourceware dot org
  2022-05-20 15:04 ` tromey at sourceware dot org
                   ` (22 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2022-03-06 17:11 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #9 from Tom Tromey <tromey at sourceware dot org> ---
The dup points out another ODR violation, not sure if it
is platform-specific or not.

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2022-03-06 17:11 ` tromey at sourceware dot org
@ 2022-05-20 15:04 ` tromey at sourceware dot org
  2022-06-02 15:30 ` tromey at sourceware dot org
                   ` (21 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2022-05-20 15:04 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #10 from Tom Tromey <tromey at sourceware dot org> ---
More fixes here:
https://sourceware.org/pipermail/gdb-patches/2022-May/189194.html

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2022-05-20 15:04 ` tromey at sourceware dot org
@ 2022-06-02 15:30 ` tromey at sourceware dot org
  2022-09-09  0:56 ` tromey at sourceware dot org
                   ` (20 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2022-06-02 15:30 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #11 from Tom Tromey <tromey at sourceware dot org> ---
I checked in those fixes, but there are still more ODR violations remaining,
so this bug should stay open.

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2022-06-02 15:30 ` tromey at sourceware dot org
@ 2022-09-09  0:56 ` tromey at sourceware dot org
  2022-11-08 11:01 ` ago at gentoo dot org
                   ` (19 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2022-09-09  0:56 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |24835


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=24835
[Bug 24835] powerpc build breaker with Werror=odr
-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2022-09-09  0:56 ` tromey at sourceware dot org
@ 2022-11-08 11:01 ` ago at gentoo dot org
  2022-11-10 22:09 ` tromey at sourceware dot org
                   ` (18 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: ago at gentoo dot org @ 2022-11-08 11:01 UTC (permalink / raw)
  To: gdb-prs

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

Agostino Sarubbo <ago at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ago at gentoo dot org

--- Comment #12 from Agostino Sarubbo <ago at gentoo dot org> ---
We are still reproducing it in gentoo with 12.1:

https://bugs.gentoo.org/853898

ada-exp.c.tmp:576:7: error: type ‘union YYSTYPE’ violates the C++ One
Definition Rule [-Werror=odr]

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2022-11-08 11:01 ` ago at gentoo dot org
@ 2022-11-10 22:09 ` tromey at sourceware dot org
  2022-11-10 22:12 ` tromey at sourceware dot org
                   ` (17 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2022-11-10 22:09 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=22395
Bug 22395 depends on bug 24835, which changed state.

Bug 24835 Summary: powerpc build breaker with Werror=odr
https://sourceware.org/bugzilla/show_bug.cgi?id=24835

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

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2022-11-10 22:09 ` tromey at sourceware dot org
@ 2022-11-10 22:12 ` tromey at sourceware dot org
  2022-11-11  5:30 ` sam at gentoo dot org
                   ` (16 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2022-11-10 22:12 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #13 from Tom Tromey <tromey at sourceware dot org> ---
I looked into this a bit, but fixing the YYSTYPE one is
a real pain unless perhaps we are willing to require bison
so that we can use a bison-specific feature.

The usual remapping approach doesn't work because
the generated .c file checks:

#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
...

I guess maybe we could write out the union by hand but
that seems pretty ugly.

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2022-11-10 22:12 ` tromey at sourceware dot org
@ 2022-11-11  5:30 ` sam at gentoo dot org
  2023-08-14  9:30 ` vries at gcc dot gnu.org
                   ` (15 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: sam at gentoo dot org @ 2022-11-11  5:30 UTC (permalink / raw)
  To: gdb-prs

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2022-11-11  5:30 ` sam at gentoo dot org
@ 2023-08-14  9:30 ` vries at gcc dot gnu.org
  2023-08-14 12:25 ` vries at gcc dot gnu.org
                   ` (14 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: vries at gcc dot gnu.org @ 2023-08-14  9:30 UTC (permalink / raw)
  To: gdb-prs

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

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

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

--- Comment #14 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Hi-Angel from comment #0)
> 	nat/linux-btrace.h:85:8: warning: type ‘struct btrace_target_info’ violates
> the C++ One Definition Rule [-Wodr]
> 	 struct btrace_target_info
> 			^
> 	remote.c:13157:8: note: a different type is defined in another translation
> unit
> 	 struct btrace_target_info
> 			^
> 	nat/linux-btrace.h:102:5: note: the first difference of corresponding
> definitions is field ‘variant’
> 	   } variant;
> 		 ^
> 	remote.c:13157:8: note: a type with different number of fields is defined
> in another translation unit
> 	 struct btrace_target_info
> 			^

I've filed this particular one as PR30751, and cc-ed the btrace maintainer.

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2023-08-14  9:30 ` vries at gcc dot gnu.org
@ 2023-08-14 12:25 ` vries at gcc dot gnu.org
  2023-08-14 12:36 ` tromey at sourceware dot org
                   ` (13 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: vries at gcc dot gnu.org @ 2023-08-14 12:25 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #15 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom Tromey from comment #13)
> I looked into this a bit, but fixing the YYSTYPE one is
> a real pain unless perhaps we are willing to require bison
> so that we can use a bison-specific feature.
> 
> The usual remapping approach doesn't work because
> the generated .c file checks:
> 
> #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
> union YYSTYPE
> {
> ...
> 
> I guess maybe we could write out the union by hand but
> that seems pretty ugly.

I've proposed a patch for this (
https://sourceware.org/pipermail/gdb-patches/2023-August/201600.html ).

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2023-08-14 12:25 ` vries at gcc dot gnu.org
@ 2023-08-14 12:36 ` tromey at sourceware dot org
  2023-08-14 15:50 ` vries at gcc dot gnu.org
                   ` (12 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: tromey at sourceware dot org @ 2023-08-14 12:36 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |30751


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=30751
[Bug 30751] [gdb/build] ODR violation for struct btrace_target_info
-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (17 preceding siblings ...)
  2023-08-14 12:36 ` tromey at sourceware dot org
@ 2023-08-14 15:50 ` vries at gcc dot gnu.org
  2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
                   ` (11 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: vries at gcc dot gnu.org @ 2023-08-14 15:50 UTC (permalink / raw)
  To: gdb-prs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |30757


Referenced Bugs:

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (18 preceding siblings ...)
  2023-08-14 15:50 ` vries at gcc dot gnu.org
@ 2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
  2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
                   ` (10 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-14 16:32 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #16 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6a93ab8af49be41a44af1b4651e9ab2ebc6d2f77

commit 6a93ab8af49be41a44af1b4651e9ab2ebc6d2f77
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon Aug 14 18:32:29 2023 +0200

    [gdb/build] Fix enum param_types odr violation

    When building gdb with -O2 -flto, I run into:
    ...
    gdb/guile/scm-param.c:121:6: warning: type 'param_types' violates the C++ \
      One Definition Rule [-Wodr]
     enum param_types
          ^
    gdb/python/py-param.c:33:6: note: an enum with different value name is \
      defined in another translation unit
     enum param_types
          ^
    ...

    Fix this by renaming to enum scm_param_types and py_param_types.

    Tested on x86_64-linux.

    Approved-By: Tom Tromey <tom@tromey.com>

    PR build/22395
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (19 preceding siblings ...)
  2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
@ 2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
  2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
                   ` (9 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-14 16:32 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #17 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9972aac27d5d664a29abc88acd3a84c1e72064c4

commit 9972aac27d5d664a29abc88acd3a84c1e72064c4
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon Aug 14 18:32:29 2023 +0200

    [gdb/build] Fix struct token_and_value odr violation

    When build gdb with -O2 -flto I run into:
    ...
    gdb/c-exp.y:3003:8: warning: type 'struct token_and_value' violates the C++
\
      One Definition Rule [-Wodr]
     struct token_and_value
            ^
    gdb/d-exp.y:1310:8: note: a different type is defined in another
translation \
      unit
     struct token_and_value
            ^
    ...

    Fix this by renaming to c_token_and_value and d_token_and_value.

    Likewise in gdb/go-exp.y, renaming to go_token_and_value.

    Tested on x86_64-linux.

    Approved-By: Tom Tromey <tom@tromey.com>

    PR build/22395
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (20 preceding siblings ...)
  2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
@ 2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
  2023-08-14 20:53 ` cvs-commit at gcc dot gnu.org
                   ` (8 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-14 16:32 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #18 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e72b937dddaf24d99ec1bf3beda4d8ecf3cd368c

commit e72b937dddaf24d99ec1bf3beda4d8ecf3cd368c
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon Aug 14 18:32:29 2023 +0200

    [gdb/build] Fix struct token odr violation

    When building gdb with -O2 -flto I run into:
    ...
    /data/vries/gdb/src/gdb/c-exp.y:2450:8: warning: type 'struct token' \
      violates the C++ One Definition Rule [-Wodr]
     struct token
            ^
    /data/vries/gdb/src/gdb/d-exp.y:939:8: note: a different type is defined in
\
      another translation unit
     struct token
            ^
    ...

    Fix this by renaming to c_token and d_token.

    Likewise in:
    - fortran-exp.y, renaming to f_token,
    - go-exp.y, renaming to go_token, and
    - p-exp.y, renaming to p_token.

    Tested on x86_64-linux.

    Approved-By: Tom Tromey <tom@tromey.com>

    PR build/22395
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (21 preceding siblings ...)
  2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
@ 2023-08-14 20:53 ` cvs-commit at gcc dot gnu.org
  2023-08-15  3:28 ` sam at gentoo dot org
                   ` (7 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-14 20:53 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #19 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bc6c74b1406cd9f71b432ac61799c1d1bea60a39

commit bc6c74b1406cd9f71b432ac61799c1d1bea60a39
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon Aug 14 22:52:52 2023 +0200

    [gdb/build] Fix YYSTYPE and yyalloc odr violation

    When building gdb with -O2 -flto I run into:
    ...
    ada-exp.c.tmp:576:7: error: type âunion YYSTYPEâ violates the C++ One \
      Definition Rule [-Werror=odr]
    ...

    Fix this by renaming to ada_exp_YYSTYPE and likewise for other .y files.

    Likewise for yyalloc.

    Tested on x86_64-linux.  Also tested with byacc rather than bison on
    suggestion of Tom Tromey.

    Approved-By: Tom Tromey <tom@tromey.com>

    PR build/22395
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (22 preceding siblings ...)
  2023-08-14 20:53 ` cvs-commit at gcc dot gnu.org
@ 2023-08-15  3:28 ` sam at gentoo dot org
  2023-08-17  9:39 ` vries at gcc dot gnu.org
                   ` (6 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: sam at gentoo dot org @ 2023-08-15  3:28 UTC (permalink / raw)
  To: gdb-prs

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |30758


Referenced Bugs:

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (23 preceding siblings ...)
  2023-08-15  3:28 ` sam at gentoo dot org
@ 2023-08-17  9:39 ` vries at gcc dot gnu.org
  2023-08-17 15:10 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: vries at gcc dot gnu.org @ 2023-08-17  9:39 UTC (permalink / raw)
  To: gdb-prs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|30758                       |


Referenced Bugs:

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (24 preceding siblings ...)
  2023-08-17  9:39 ` vries at gcc dot gnu.org
@ 2023-08-17 15:10 ` cvs-commit at gcc dot gnu.org
  2023-08-22 17:36 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-17 15:10 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #20 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0c9546b152f6b01756475ce259c895d3fa446774

commit 0c9546b152f6b01756475ce259c895d3fa446774
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Aug 17 17:09:39 2023 +0200

    [gdb/build] Fix yysymbol_kind_t odr violation

    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

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (25 preceding siblings ...)
  2023-08-17 15:10 ` cvs-commit at gcc dot gnu.org
@ 2023-08-22 17:36 ` vries at gcc dot gnu.org
  2023-09-11  6:55 ` vries at gcc dot gnu.org
                   ` (3 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: vries at gcc dot gnu.org @ 2023-08-22 17:36 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=22395
Bug 22395 depends on bug 30757, which changed state.

Bug 30757 Summary: [gdb/build] ODR violations in opcodes dir
https://sourceware.org/bugzilla/show_bug.cgi?id=30757

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

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (26 preceding siblings ...)
  2023-08-22 17:36 ` vries at gcc dot gnu.org
@ 2023-09-11  6:55 ` vries at gcc dot gnu.org
  2023-09-11  7:29 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  30 siblings, 0 replies; 31+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-11  6:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=22395
Bug 22395 depends on bug 30751, which changed state.

Bug 30751 Summary: [gdb/build] ODR violation for struct btrace_target_info
https://sourceware.org/bugzilla/show_bug.cgi?id=30751

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

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (27 preceding siblings ...)
  2023-09-11  6:55 ` vries at gcc dot gnu.org
@ 2023-09-11  7:29 ` vries at gcc dot gnu.org
  2023-09-11 20:02 ` sam at gentoo dot org
  2023-09-27  7:36 ` sam at gentoo dot org
  30 siblings, 0 replies; 31+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-11  7:29 UTC (permalink / raw)
  To: gdb-prs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.1
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #21 from Tom de Vries <vries at gcc dot gnu.org> ---
AFAICT, no more ODR warnings, so I'm marking this fixed.

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

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (28 preceding siblings ...)
  2023-09-11  7:29 ` vries at gcc dot gnu.org
@ 2023-09-11 20:02 ` sam at gentoo dot org
  2023-09-27  7:36 ` sam at gentoo dot org
  30 siblings, 0 replies; 31+ 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=22395

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |30839


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=30839
[Bug 30839] ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug build/22395] ODR violations
       [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
                   ` (29 preceding siblings ...)
  2023-09-11 20:02 ` sam at gentoo dot org
@ 2023-09-27  7:36 ` sam at gentoo dot org
  30 siblings, 0 replies; 31+ 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=22395
Bug 22395 depends on bug 30839, which changed state.

Bug 30839 Summary: ODR warnings in ada-exp.c.tmp/c-exp.c.tmp
https://sourceware.org/bugzilla/show_bug.cgi?id=30839

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

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

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

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

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-22395-4717@http.sourceware.org/bugzilla/>
2021-01-09 17:18 ` [Bug build/22395] ODR violations tromey at sourceware dot org
2021-03-11 19:47 ` tromey at sourceware dot org
2021-03-12 17:03 ` cbiesinger at google dot com
2021-03-12 17:46 ` palves at redhat dot com
2021-03-12 18:29 ` tromey at sourceware dot org
2021-03-12 18:58 ` schwab@linux-m68k.org
2022-03-06 17:10 ` tromey at sourceware dot org
2022-03-06 17:11 ` tromey at sourceware dot org
2022-05-20 15:04 ` tromey at sourceware dot org
2022-06-02 15:30 ` tromey at sourceware dot org
2022-09-09  0:56 ` tromey at sourceware dot org
2022-11-08 11:01 ` ago at gentoo dot org
2022-11-10 22:09 ` tromey at sourceware dot org
2022-11-10 22:12 ` tromey at sourceware dot org
2022-11-11  5:30 ` sam at gentoo dot org
2023-08-14  9:30 ` vries at gcc dot gnu.org
2023-08-14 12:25 ` vries at gcc dot gnu.org
2023-08-14 12:36 ` tromey at sourceware dot org
2023-08-14 15:50 ` vries at gcc dot gnu.org
2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
2023-08-14 16:32 ` cvs-commit at gcc dot gnu.org
2023-08-14 20:53 ` cvs-commit at gcc dot gnu.org
2023-08-15  3:28 ` sam at gentoo dot org
2023-08-17  9:39 ` vries at gcc dot gnu.org
2023-08-17 15:10 ` cvs-commit at gcc dot gnu.org
2023-08-22 17:36 ` vries at gcc dot gnu.org
2023-09-11  6:55 ` vries at gcc dot gnu.org
2023-09-11  7:29 ` vries at gcc dot gnu.org
2023-09-11 20:02 ` 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).