From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69354384640E; Thu, 25 Apr 2024 09:59:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69354384640E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714039180; bh=9qDXvkNqmVAoge/gjFnC2z/30kbQug4vOF9zCnThGAo=; h=From:To:Subject:Date:From; b=PlnYkvhfHM2hvlqbFXYwbAvqSnHVaVdXfvWmfyNONscHMPqrKa7D1oh+pcwrfmSQ3 lFnCk2i+3c7MOJg4txgITOEggi+YpicmWIo+AxtLQn0cPaZkZ8Nq8Fv0woXpGKYBcc Q79u7CuiRn6OdCSBZLKGC2wCgG4Qh2cWIAI9RJwI= From: "zamazan4ik at tut dot by" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/114851] New: Alternative to -Wmisexpect from LLVM in GCC Date: Thu, 25 Apr 2024 09:59:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zamazan4ik at tut dot by 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 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://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114851 Bug ID: 114851 Summary: Alternative to -Wmisexpect from LLVM in GCC Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: zamazan4ik at tut dot by Target Milestone: --- LLVM infrastructure supports a diagnostic for checking mismatches between user-provided __builtin_expect/[[likely]] hints and PGO profiles: https://clang.llvm.org/docs/DiagnosticsReference.html#wmisexpect + https://llvm.org/docs/MisExpect.html (and an example of its usage in Chromi= um: https://issues.chromium.org/issues/40694104). I was trying to find a similar diagnostic in GCC but found nothing. Is there anything similar in GCC? If not, can we make the issue a Feature Request for such a feature? Having such a diagnostic can be helpful in practice since it allows for finding wrongfully placed user hints in sources.=