Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

-Werror ignored?

Nolta__Mike
Beginner
169 Views

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
169 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
169 Views

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

Viet_H_Intel
Moderator
169 Views

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

Thanks,

Viet 

Reply