https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78863
Bug ID: 78863
Summary: error on -fsanitize suggests invalid -fsanitize=all
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: msebor at gcc dot gnu.org
Target Milestone: ---
The manual explains that the -fsanitize=all option is not allowed by GCC:
-fno-sanitize=all
This option disables all previously enabled sanitizers. -fsanitize=all is
not allowed, as some sanitizers cannot be used together.
But when GCC is invoked with just plain -fsanitize (with no = after it) GCC
gives an error as expected but then goes on to suggest that maybe the invalid
-fsanitize=all was meant.
$ echo | gcc -O2 -S -Wall -fsanitize -xc - || echo | gcc -O2 -S -Wall
-fsanitize=all -xc -
xgcc: error: unrecognized command line option ‘-fsanitize’; did you mean
‘-fsanitize=all’?
xgcc: error: -fsanitize=all option is not valid