From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 32CC2385840C; Fri, 5 Apr 2024 16:09:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32CC2385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712333374; bh=WO1YNf8SPdiCgaH/k6ljuJShwXOfaltWPE0/pqhuHgc=; h=From:To:Subject:Date:From; b=w90WgIHTnaxlQaAmwaLKd/aGbdnaER+S2kmMJzRqgRtj6emkYmJ28e4bL6RSso3xN dUPeVNCPxT99RzMlEuceNlT6mO6v0nDOjVvqv+SbnL+oYp3lQJmwky+FzU76mPyg0O 56yfse8ZGC3NXCfzfH9VmTmvKEaKVwSRL20R8QfE= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/114606] New: -Whardened doesn't trigger with -fcf-protection=none Date: Fri, 05 Apr 2024 16:09:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek 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 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=3D114606 Bug ID: 114606 Summary: -Whardened doesn't trigger with -fcf-protection=3Dnone Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- -Whardened warns when -fhardened couldn't enable a hardening option because that option was disabled on the command line, e.g.: $ ./cc1plus -quiet g.C -fhardened -O2 -fstack-protector cc1plus: warning: =E2=80=98-fstack-protector-strong=E2=80=99 is not enabled= by =E2=80=98-fhardened=E2=80=99 because it was specified on the command line [-Whardened] but it doesn't work as expected with -fcf-protection=3Dnone: $ ./cc1plus -quiet g.C -fhardened -O2 -fcf-protection=3Dnone # should warn because we're checking =3D=3D CF_NONE which doesn't distinguish between not= hing and -fcf-protection=3Dnone. I'm hoping the fix is simply to use OPTION_SET_P.=