From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DC8BE3858D33; Fri, 19 Apr 2024 00:22:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC8BE3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713486168; bh=+4dSbW/TmglNDQ9cUFNMdSrc4RGoe0mMtoJmjNi3w/I=; h=From:To:Subject:Date:From; b=S1GNQBxJ4RjH/WB8hTLRw+tBEQQTJHIJ4IdFyW3laPYJE4qGrlteVmO9KRwbGDrQd sRiBXDnFpp1VcNNPtufH29JtboAgT6S5oOhWdPf46UD8F4bQjeO7QwBaPEDenUITKb TEBt5qP9Fxqtqsxl7XZlsNlvzqI74UTd1ScMncEQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114777] New: inconsistent warning for pure functions on deconstructors/constructors on arm compared to other targets Date: Fri, 19 Apr 2024 00:22:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114777 Bug ID: 114777 Summary: inconsistent warning for pure functions on deconstructors/constructors on arm compared to other targets Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Target: arm-eabi, arm-linux-gnueabi Take: ``` struct A { A(); [[gnu::pure]] ~A(); }; ``` This warns on all targets except for arm-eabi (and arm-linux-gnueabi) due to having targetm.cxx.cdtor_returns_this() return true. I only noticed this while working on PR 19661 .=