Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Dan_J_
Beginner
90 Views

Compiler warnings

Jump to solution

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.

0 Kudos
1 Solution
Judith_W_Intel
Employee
90 Views

 

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

View solution in original post

2 Replies
Judith_W_Intel
Employee
91 Views

 

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

View solution in original post

Kittur_G_Intel
Employee
90 Views

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

Reply