public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/110032] New: Option Alias(opt, posarg, negarg) doesn't accept multi args for posarg
Date: Tue, 30 May 2023 03:31:37 +0000	[thread overview]
Message-ID: <bug-110032-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110032

            Bug ID: 110032
           Summary: Option Alias(opt, posarg, negarg) doesn't accept multi
                    args for posarg
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---

.i.e.

If define

fcf-protection
Common RejectNegative Alias(fcf-protection=,branch, return)

fcf-protection=
Common Joined  Enum(cf_protection_level) EnumBitset Var(flag_cf_protection)
-fcf-protection=[full|branch|return|none|check] Instrument functions with
checks to verify jump/call/return control-flow transfer
instructions have valid targets.

Enum
Name(cf_protection_level) Type(enum cf_protection_level) UnknownError(unknown
Control-Flow Protection Level %qs)

EnumValue
Enum(cf_protection_level) String(branch) Value(CF_BRANCH)

EnumValue
Enum(cf_protection_level) String(return) Value(CF_RETURN)

EnumValue
Enum(cf_protection_level) String(check) Value(CF_CHECK)


It will be intepretted as -fcf-protection=branch, but not
-fcf-protection=branch,return. It's due to both Alias and EnumBitSet use *,* as
delimiter and can't tell if it's multi args in EnumBitSet or in Alias posarg.

And yes we can introduce another parameter full to cover all bits but then
EnumBiSet can't be used since it require every parameter to be power of 2.

                 reply	other threads:[~2023-05-30  3:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-110032-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).