Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Intel C++ compiler stops emit warnings when unsupported `/Gw` switch is specified [bug, ICL 16.0]

Garipov__Ruslan
Beginner
486 Views

`/Gw` switch (optimize global data) is used by MSFT VC++ compiler to package global data in individual COMDAT sections. This switch is not supported by ICL 16.0.

However, `/Gw` can force ICL not to warn about possible issues. For example:

icl /Qstd=c++11 /Qstd=c++14 sample.cpp

causes the following warning:

icl: command line warning #10121: overriding '/Qstd=c++11' with '/Qstd=c++14'

(code in ‘sample.cpp’ doesn’t matter)

But this command:

icl /Gw /Qstd=c++11 /Qstd=c++14 sample.cpp

causes no warnings at all – compilation completes successfully. There's even no message that `/Gw` ain't supported by ICL.

Position of `/Gw` in command line doesn’t matter:

icl /Qstd=c++11 /Qstd=c++14 /Gw sample.cpp

also shows no error.

0 Kudos
1 Solution
Judith_W_Intel
Employee
486 Views

 

I have submitted a bug in our internal bugs database (DPD200408254) for our driver team to fix this problem. Thank you for bringing it to our attention.

Judy

View solution in original post

0 Kudos
3 Replies
Judith_W_Intel
Employee
486 Views

 

That is weird... It is as if /Gw is acting like /w (suppress warnings).

0 Kudos
Garipov__Ruslan
Beginner
486 Views

I believe you were right: `/Gw` works just like `/w`. Moreover I can use any character instead of `G` in `/Gw`: `A`, `B` or even `#` -- I get the same result -- ICL emits no warnings at all:

icl /Qstd=c++11 /Qstd=c++14 /@w sample.cpp
icl /Qstd=c++11 /Qstd=c++14 /Cw sample.cpp

 

0 Kudos
Judith_W_Intel
Employee
487 Views

 

I have submitted a bug in our internal bugs database (DPD200408254) for our driver team to fix this problem. Thank you for bringing it to our attention.

Judy

0 Kudos
Reply