https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90153
Bug ID: 90153 Summary: aarch64: unclear diagnostic for stack-protector options Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: roland.illig at gmx dot de Target Milestone: --- From aarch64.c: if (aarch64_stack_protector_guard == SSP_SYSREG && !(opts->x_aarch64_stack_protector_guard_offset_str && opts->x_aarch64_stack_protector_guard_reg_str)) { error ("both %<-mstack-protector-guard-offset%> and " "%<-mstack-protector-guard-reg%> must be used " "with %<-mstack-protector-guard=sysreg%>"); } From reading the diagnostic alone, it could also mean: -mstack-protector-guard-offset requires -mstack-protector-guard=sysreg and -mstack-protector-guard-reg requires -mstack-protector-guard=sysreg actually it's the other way round: mstack-protector-guard=sysreg requires both mstack-protector-guard-offset and mstack-protector-guard-reg to be set. The term "must be used with" is ambiguous regarding the direction of the "must be used" here. It could mean "from right to left", or alternatively, "from left to right".