[Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type)

2022-12-13 Thread sam at gentoo dot org via Gcc-rust
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108087

Bug ID: 108087
   Summary: -Wodr warnings in rust/rust-lang.cc (lang_type)
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rust
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
CC: dkm at gcc dot gnu.org, gcc-rust at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54082
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54082&action=edit
build.log.xz (slightly past warning)

Noticed when bootstrapping GCC 13 from trunk at r13-4681-g531ca06c007d4c.
```
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/rust-lang.cc:67:17:
warning: type [-Wodr]
   67 | struct GTY (()) lang_type
  | ^
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:234:
note: a different type is defined in another translation unit
  234 | struct GTY (()) lang_type
  |
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:236:
note: the first difference of corresponding definitions is field ‘align’
  236 |   unsigned char align;
  |
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:234:
note: a type with different number of fields is defined in another translation
unit
  234 | struct GTY (()) lang_type
  |
```

I've attached the build.log compressed a bit past the point of the warning, as
it's still building.

Host compiler is 12.2.1_p20221210.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
Gcc-rust mailing list
Gcc-rust@gcc.gnu.org
https://gcc.gnu.org/mailman/listinfo/gcc-rust


[Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)

2022-12-13 Thread sam at gentoo dot org via Gcc-rust
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108087

--- Comment #1 from Sam James  ---
Sorry, output got mangled slightly by ansifiltering:
```
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/rust-lang.cc:67:17:
warning: type ‘struct lang_type’ violates the C++ One Definition Rule [-Wodr]
   67 | struct GTY (()) lang_type
  | ^
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:234:
note: a different type is defined in another translation unit
  234 | struct GTY (()) lang_type
  |
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:236:
note: the first difference of corresponding definitions is field ‘align’
  236 |   unsigned char align;
  |
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:234:
note: a type with different number of fields is defined in another translation
unit
  234 | struct GTY (()) lang_type
  |
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
Gcc-rust mailing list
Gcc-rust@gcc.gnu.org
https://gcc.gnu.org/mailman/listinfo/gcc-rust


[Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)

2022-12-13 Thread sam at gentoo dot org via Gcc-rust
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108087

Sam James  changed:

   What|Removed |Added

   Host||x86_64-pc-linux-gnu

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
Gcc-rust mailing list
Gcc-rust@gcc.gnu.org
https://gcc.gnu.org/mailman/listinfo/gcc-rust