Compiler warnings

Compiler warnings

I am compiling my code with icpc, it seems that despite the fact I use -Wall, intel compiler does not show most trivial of warnings, (unused variables.. uninitialized variables.. etc..) are not shown, did anyone encounter this or knows a way to fix it to truly show all warnings?

Thanks.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

 

Two choices:

(1) Figure out which specific diagnostics you would like that GNU enables with specific -W options, i.e.:  -Wuninititalized or -Wunused. Since our -Wall must be compatible with GNU we do not show all remarks with -Wall.

(2) Enable all of our diagnostics by adding -Wremarks. This may give you some additional diagnostics you don't care about which you would then have to disable individually with -diag-disable.

See icpc -help for details.

Judy

Also a related note: If you want to see a listing of all the diagnostics provided by the compiler you can use the -diag-dump option to dump out to a file and enable those that you are interested explicitly...

_Kittur

Leave a Comment

Please sign in to add a comment. Not a member? Join today