From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id A4CA9396E056; Thu, 2 Jun 2022 15:29:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4CA9396E056 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] ODR warnings for struct nextfield X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 77845a9ac6871b2480b1533b70831db320233885 X-Git-Newrev: 7e9d9756db9e4243a219d8837f2691572bcd5819 Message-Id: <20220602152903.A4CA9396E056@sourceware.org> Date: Thu, 2 Jun 2022 15:29:03 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2022 15:29:03 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D7e9d9756db9e= 4243a219d8837f2691572bcd5819 commit 7e9d9756db9e4243a219d8837f2691572bcd5819 Author: Tom Tromey Date: Tue May 10 09:13:05 2022 -0600 ODR warnings for struct nextfield =20 "struct nextfield" is defined in multiple places in GDB. This patch renames just the stabs one, leaving the DWARF one untouched. =20 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D22395 Diff: --- gdb/stabsread.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 4fe2110a47f..ab74cee6487 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -61,9 +61,9 @@ int *this_object_header_files; int n_this_object_header_files; int n_allocated_this_object_header_files; =20 -struct nextfield +struct stabs_nextfield { - struct nextfield *next; + struct stabs_nextfield *next; =20 /* This is the raw visibility from the stab. It is not checked for being one of the visibilities we recognize, so code which @@ -87,7 +87,7 @@ struct next_fnfieldlist =20 struct stab_field_info { - struct nextfield *list =3D nullptr; + struct stabs_nextfield *list =3D nullptr; struct next_fnfieldlist *fnlist =3D nullptr; =20 auto_obstack obstack; @@ -2922,7 +2922,7 @@ read_struct_fields (struct stab_field_info *fip, cons= t char **pp, struct type *type, struct objfile *objfile) { const char *p; - struct nextfield *newobj; + struct stabs_nextfield *newobj; =20 /* We better set p right now, in case there are no fields at all... */ =20 @@ -2938,7 +2938,7 @@ read_struct_fields (struct stab_field_info *fip, cons= t char **pp, { STABS_CONTINUE (pp, objfile); /* Get space to record the next field's data. */ - newobj =3D OBSTACK_ZALLOC (&fip->obstack, struct nextfield); + newobj =3D OBSTACK_ZALLOC (&fip->obstack, struct stabs_nextfield); =20 newobj->next =3D fip->list; fip->list =3D newobj; @@ -3019,7 +3019,7 @@ read_baseclasses (struct stab_field_info *fip, const = char **pp, struct type *type, struct objfile *objfile) { int i; - struct nextfield *newobj; + struct stabs_nextfield *newobj; =20 if (**pp !=3D '!') { @@ -3059,7 +3059,7 @@ read_baseclasses (struct stab_field_info *fip, const = char **pp, =20 for (i =3D 0; i < TYPE_N_BASECLASSES (type); i++) { - newobj =3D OBSTACK_ZALLOC (&fip->obstack, struct nextfield); + newobj =3D OBSTACK_ZALLOC (&fip->obstack, struct stabs_nextfield); =20 newobj->next =3D fip->list; fip->list =3D newobj; @@ -3245,7 +3245,7 @@ attach_fields_to_type (struct stab_field_info *fip, s= truct type *type, { int nfields =3D 0; int non_public_fields =3D 0; - struct nextfield *scan; + struct stabs_nextfield *scan; =20 /* Count up the number of fields that we have, as well as taking note of whether or not there are any non-public fields, which requires us to