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.
7667 Discussions

Is there any alternative way to achieve function of some gcc options? (like -Wlogical-op, -Wvla ...)

chao_z_2
Beginner
126 Views

Hi, all,

I am trying to use icc to compile an already existed porject which used to be compiled using gcc. At first i thought icc is compatible with gcc (my gcc version is 4.8.4 and icc version is 2015) after read GCC* Compatibility and Interoperability, but when compile my project with icc, i found some options icc doesn't support as below:

-Wswitch-default, -Wredundant-decls, -Wcast-align, -Wlogical-op, -Wvla, -Wold-style-cast 

I wonder if there any alternative way to achieve function of these gcc options.

Furthermore, is there a list whose content relates to diffiences between gcc options and icc options.

Thanks a lot.

0 Kudos
1 Reply
Melanie_B_Intel
Employee
126 Views

Those gcc options are just for requesting specific warning diagnostics. Since you know that your project compiles correctly with gcc, you don't need to worry about the fact that icc doesn't currently implement those particular -W options.  Is your project building or do you encounter an error?  If you are getting an error, please cut and paste the diagnostic error messages into a reply. We can likely provide a workaround.  

--Melanie

Reply