Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Nolta__Mike
Beginner
91 Views

-Werror ignored?

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.

0 Kudos
3 Replies
Viet_H_Intel
Moderator
91 Views

Hi Mike,

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.

Thanks,

Viet 

Nolta__Mike
Beginner
91 Views

Thanks, but the question remains: why doesn't -Werror work?

Viet_H_Intel
Moderator
91 Views

-Werror forces warnings to be reported as errors on source code, not command line options.

Thanks,

Viet 

Reply