From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DFB4639730F0; Wed, 20 Jan 2021 16:39:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFB4639730F0 From: "joel.sherrill at oarcorp dot com" To: gdb-prs@sourceware.org Subject: [Bug remote/27219] New: remote.c compilation failure on CentOS 7 Date: Wed, 20 Jan 2021 16:39:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joel.sherrill at oarcorp dot com X-Bugzilla-Status: UNCONFIRMED 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 attachments.created 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2021 16:39:53 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27219 Bug ID: 27219 Summary: remote.c compilation failure on CentOS 7 Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: remote Assignee: unassigned at sourceware dot org Reporter: joel.sherrill at oarcorp dot com Target Milestone: --- Created attachment 13140 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D13140&action=3Ded= it Patch to address naming conflict in remote.c Per https://sourceware.org/pipermail/gdb-patches/2021-January/175167.html, gdb/remote.c fails to compile on CentOS 7. The compilation error is because= an enum and method have the same name. Per a suggestion in the thread, I renam= ed the method resume_state() to get_resume_start(). Hopefully the name is OK. I just went with the most obvious choice to me. This is in the attached patch. Here is the error as reported by Sebastian Huber: there could be a problem with this "enum class" on CentOS 7.9: ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/remote.c:1157:38: error: 'resume_state' is not a class, namespace, or enumeration enum resume_state m_resume_state =3D resume_state::NOT_RESUMED; ^ ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/remote.c: In member functi= on 'void remote_thread_info::set_not_resumed()': ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/remote.c:1115:22: error: 'resume_state' is not a class, namespace, or enumeration m_resume_state =3D resume_state::NOT_RESUMED; ^ ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/remote.c: In member functi= on 'void remote_thread_info::set_resumed_pending_vcont(bool, gdb_signal)': ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/remote.c:1121:22: error: 'resume_state' is not a class, namespace, or enumeration m_resume_state =3D resume_state::RESUMED_PENDING_VCONT; ^ In file included from ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/../gdbsupport/gdb_string_v= iew.h:49:0, from ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/../gdbsupport/common-utils= .h:46, from ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/../gdbsupport/common-defs.= h:125, from ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/defs.h:28, from ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/remote.c:22: ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/remote.c: In member functi= on 'const resumed_pending_vcont_info& remote_thread_info::resumed_pending_vcont_info() const': ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/remote.c:1132:35: error: 'resume_state' is not a class, namespace, or enumeration gdb_assert (m_resume_state =3D=3D resume_state::RESUMED_PENDING_VCONT= ); ^ ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/../gdbsupport/gdb_assert.h= :35:13: note: in definition of macro 'gdb_assert' ((void) ((expr) ? 0 :=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 \ ^ ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/remote.c: In member functi= on 'void remote_thread_info::set_resumed()': ../../sourceware-mirror-binutils-gdb-edf0f28/gdb/remote.c:1140:22: error: 'resume_state' is not a class, namespace, or enumeration m_resume_state =3D resume_state::RESUMED; ^ --=20 You are receiving this mail because: You are on the CC list for the bug.=