From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1C96B3858C2D; Mon, 14 Aug 2023 15:44:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C96B3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692027894; bh=00rvO4COrQ/O24Ez1hJqfzlc3N0SUo3ippX/kWWm0ZA=; h=From:To:Subject:Date:From; b=JWJmHre4MsTtVkB4JK//N4/aIPg7NV6/2Ayq7b+y8cUTpSXzYCiJ9Z5QjlB2nPAhK mGcW91TwpsHDEcL38wzY8XBS9i92Zc5xoA1pFAXkUwLlzOXgS6otBxafVyfJOPuDmm ZSkESsKjGTKjooa0LEoMxnvjkHHYa0Gxw8tIYOLg= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug build/30757] New: [gdb/build] ODR violations in opcodes dir Date: Mon, 14 Aug 2023 15:44:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30757 Bug ID: 30757 Summary: [gdb/build] ODR violations in opcodes dir Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: build Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- When building gdb with -O2 -flto -Wall, I run into a cluster of odr violati= ons in dir opcodes: ... /labs/tdevries/gdb/src/gdb/../opcodes/mep-desc.h:250:14: warning: type 'cgen_operand_type' violates the C++ One Definition Rule [-Wodr] typedef enum cgen_operand_type { ^ /labs/tdevries/gdb/src/gdb/../opcodes/or1k-desc.h:624:14: note: an enum with different value name is defined in another translation unit typedef enum cgen_operand_type { ^ /labs/tdevries/gdb/src/gdb/../opcodes/mep-desc.h:212:14: warning: type 'cgen_hw_type' violates the C++ One Definition Rule [-Wodr] typedef enum cgen_hw_type { ^ /labs/tdevries/gdb/src/gdb/../opcodes/or1k-desc.h:433:14: note: an enum with different value name is defined in another translation unit typedef enum cgen_hw_type { ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:778:3: warning: type 'struct CGEN_OPINST' violates the C++ One Definition Rule [-Wodr] } CGEN_OPINST; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:778:3: note: a different type is defined in another translation unit } CGEN_OPINST; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:754:21: note: the first difference of corresponding definitions is field 'hw_type' enum cgen_hw_type hw_type; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:754:21: note: a field of same name but different type is defined in another translation unit enum cgen_hw_type hw_type; ^ /labs/tdevries/gdb/src/gdb/../opcodes/mep-desc.h:212:14: note: type 'cgen_hw_type' itself violates the C++ One Definition Rule typedef enum cgen_hw_type { ^ /labs/tdevries/gdb/src/gdb/../opcodes/or1k-desc.h:433:14: note: the incompatible type is defined here typedef enum cgen_hw_type { ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:827:16: warning: type 'struct cgen_ifld' violates the C++ One Definition Rule [-Wodr] typedef struct cgen_ifld { ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:827:16: note: a type wi= th different size is defined in another translation unit typedef struct cgen_ifld { ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:885:3: warning: type 'struct CGEN_IFMT_IFLD' violates the C++ One Definition Rule [-Wodr] } CGEN_IFMT_IFLD; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:885:3: note: a different type is defined in another translation unit } CGEN_IFMT_IFLD; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:883:20: note: the first difference of corresponding definitions is field 'ifld' const CGEN_IFLD *ifld; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:883:20: note: a field of same name but different type is defined in another translation unit const CGEN_IFLD *ifld; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:859:3: note: type 'const struct CGEN_IFLD' should match type 'const struct CGEN_IFLD' } CGEN_IFLD; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:978:48: warning: type 'struct CGEN_INSN_ATTR_TYPE' violates the C++ One Definition Rule [-Wodr] typedef CGEN_ATTR_TYPE (CGEN_INSN_NBOOL_ATTRS) CGEN_INSN_ATTR_TYPE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:978:48: note: a differe= nt type is defined in another translation unit typedef CGEN_ATTR_TYPE (CGEN_INSN_NBOOL_ATTRS) CGEN_INSN_ATTR_TYPE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:978:9: note: the first difference of corresponding definitions is field 'nonbool' typedef CGEN_ATTR_TYPE (CGEN_INSN_NBOOL_ATTRS) CGEN_INSN_ATTR_TYPE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:978:9: note: a field of same name but different type is defined in another translation unit typedef CGEN_ATTR_TYPE (CGEN_INSN_NBOOL_ATTRS) CGEN_INSN_ATTR_TYPE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:978:48: note: array typ= es have different bounds typedef CGEN_ATTR_TYPE (CGEN_INSN_NBOOL_ATTRS) CGEN_INSN_ATTR_TYPE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1041:3: warning: type 'struct CGEN_IBASE' violates the C++ One Definition Rule [-Wodr] } CGEN_IBASE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1041:3: note: a differe= nt type is defined in another translation unit } CGEN_IBASE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1034:23: note: the first difference of corresponding definitions is field 'attrs' CGEN_INSN_ATTR_TYPE attrs; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1034:23: note: a field = of same name but different type is defined in another translation unit CGEN_INSN_ATTR_TYPE attrs; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:978:48: note: type 'str= uct CGEN_INSN_ATTR_TYPE' itself violates the C++ One Definition Rule typedef CGEN_ATTR_TYPE (CGEN_INSN_NBOOL_ATTRS) CGEN_INSN_ATTR_TYPE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1050:8: warning: type 'struct cgen_insn' violates the C++ One Definition Rule [-Wodr] struct cgen_insn ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1050:8: note: a differe= nt type is defined in another translation unit struct cgen_insn ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1056:21: note: the first difference of corresponding definitions is field 'base' const CGEN_IBASE *base; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1056:21: note: a field = of same name but different type is defined in another translation unit const CGEN_IBASE *base; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1041:3: note: type 'con= st struct CGEN_IBASE' should match type 'const struct CGEN_IBASE' } CGEN_IBASE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1069:16: warning: type 'struct cgen_insn_list' violates the C++ One Definition Rule [-Wodr] typedef struct cgen_insn_list ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1069:16: note: a differ= ent type is defined in another translation unit typedef struct cgen_insn_list ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1072:20: note: the first difference of corresponding definitions is field 'insn' const CGEN_INSN *insn; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1072:20: note: a field = of same name but different type is defined in another translation unit const CGEN_INSN *insn; ^ /labs/tdevries/gdb/src/gdb/../opcodes/mep-opc.h:347:8: warning: type 'struct cgen_fields' violates the C++ One Definition Rule [-Wodr] struct cgen_fields ^ /labs/tdevries/gdb/src/gdb/../opcodes/or1k-opc.h:93:8: note: a different ty= pe is defined in another translation unit struct cgen_fields ^ /labs/tdevries/gdb/src/gdb/../opcodes/mep-opc.h:352:8: note: the first difference of corresponding definitions is field 'f_major' long f_major; ^ /labs/tdevries/gdb/src/gdb/../opcodes/or1k-opc.h:98:8: note: a field with different name is defined in another translation unit long f_opcode; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1083:3: warning: type 'struct CGEN_INSN_TABLE' violates the C++ One Definition Rule [-Wodr] } CGEN_INSN_TABLE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1083:3: note: a differe= nt type is defined in another translation unit } CGEN_INSN_TABLE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1079:20: note: the first difference of corresponding definitions is field 'init_entries' const CGEN_INSN *init_entries; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1079:20: note: a field = of same name but different type is defined in another translation unit const CGEN_INSN *init_entries; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:702:3: warning: type 'struct CGEN_OPERAND' violates the C++ One Definition Rule [-Wodr] } CGEN_OPERAND; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:702:3: note: a different type is defined in another translation unit } CGEN_OPERAND; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:659:26: note: the first difference of corresponding definitions is field 'type' enum cgen_operand_type type; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:659:26: note: a field of same name but different type is defined in another translation unit enum cgen_operand_type type; ^ /labs/tdevries/gdb/src/gdb/../opcodes/mep-desc.h:250:14: note: type 'cgen_operand_type' itself violates the C++ One Definition Rule typedef enum cgen_operand_type { ^ /labs/tdevries/gdb/src/gdb/../opcodes/or1k-desc.h:624:14: note: the incompatible type is defined here typedef enum cgen_operand_type { ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:725:3: warning: type 'struct CGEN_OPERAND_TABLE' violates the C++ One Definition Rule [-Wodr] } CGEN_OPERAND_TABLE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:725:3: note: a different type is defined in another translation unit } CGEN_OPERAND_TABLE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:715:23: note: the first difference of corresponding definitions is field 'init_entries' const CGEN_OPERAND *init_entries; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:715:23: note: a field of same name but different type is defined in another translation unit const CGEN_OPERAND *init_entries; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:702:3: note: type 'const struct CGEN_OPERAND' should match type 'const struct CGEN_OPERAND' } CGEN_OPERAND; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:451:3: warning: type 'struct CGEN_HW_ENTRY' violates the C++ One Definition Rule [-Wodr] } CGEN_HW_ENTRY; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:451:3: note: a different type is defined in another translation unit } CGEN_HW_ENTRY; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:441:21: note: the first difference of corresponding definitions is field 'type' enum cgen_hw_type type; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:441:21: note: a field of same name but different type is defined in another translation unit enum cgen_hw_type type; ^ /labs/tdevries/gdb/src/gdb/../opcodes/mep-desc.h:212:14: note: type 'cgen_hw_type' itself violates the C++ One Definition Rule typedef enum cgen_hw_type { ^ /labs/tdevries/gdb/src/gdb/../opcodes/or1k-desc.h:433:14: note: the incompatible type is defined here typedef enum cgen_hw_type { ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:473:3: warning: type 'struct CGEN_HW_TABLE' violates the C++ One Definition Rule [-Wodr] } CGEN_HW_TABLE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:473:3: note: a different type is defined in another translation unit } CGEN_HW_TABLE; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:463:24: note: the first difference of corresponding definitions is field 'init_entries' const CGEN_HW_ENTRY *init_entries; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:463:24: note: a field of same name but different type is defined in another translation unit const CGEN_HW_ENTRY *init_entries; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:451:3: note: type 'const struct CGEN_HW_ENTRY' should match type 'const struct CGEN_HW_ENTRY' } CGEN_HW_ENTRY; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1199:16: warning: type 'struct cgen_cpu_desc' violates the C++ One Definition Rule [-Wodr] typedef struct cgen_cpu_desc ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1199:16: note: a differ= ent type is defined in another translation unit typedef struct cgen_cpu_desc ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1252:17: note: the first difference of corresponding definitions is field 'hw_table' CGEN_HW_TABLE hw_table; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:1252:17: note: a field = of same name but different type is defined in another translation unit CGEN_HW_TABLE hw_table; ^ /labs/tdevries/gdb/src/gdb/../include/opcode/cgen.h:473:3: note: type 'stru= ct CGEN_HW_TABLE' itself violates the C++ One Definition Rule } CGEN_HW_TABLE; ^ ... --=20 You are receiving this mail because: You are on the CC list for the bug.=