I'm wondering why the following doesn't produce an error:
$ icc -mavx512f -Werror test.c && echo ok icc: command line warning #10159: invalid argument for option '-m' ok
This is with version 2018.1 on linux.
ICC issues a warning on unknown options, but gives you an option to promote it to an error.
$ icc -mavx512f -Werror test.c -we10159
will emit an error instead.