https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89701
--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> --- (In reply to Hongtao.liu from comment #2) > (In reply to Marek Polacek from comment #1) > > Confirmed. While we support -fcf-protection=branch and > > -fcf-protection=return, > > -fcf-protection=branch,return gives an error: > > > > xgcc: error: unknown Control-Flow Protection Level ‘branch,return’ > > xgcc: note: valid arguments to ‘-fcf-protection=’ are: branch check full > > none retur > > We can add a new EnumValue with string (branch,return) and value ({(enum > cf_protection_level) (CF_BRANCH | CF_RETURN)}) for this specific case, but > the implementation is too cumbersome considering the many permutations > possible. > > Another way is adding parser_cf_protection_options, called in > parse_sanitizer_options, decoding the string value and set corresponding bit > in flag_cf_protection. called in common_handle_option