icc cilk_for produces gratuitous warning on -Wshadow

icc cilk_for produces gratuitous warning on -Wshadow

This seems to be true for both icc12.0.020101006and12.0.0 20100512If I create a simple C or C++ program with a Cilk_for loop I get this warning

$ icpc -c -o foo.o foo.cpp -Wshadow

foo.cpp(2): warning #1944: declaration of "i" shadows a member of 'this'

the shadowed declaration is at line 2

_Cilk_for(int i=0; i

It doesn't matter whether I call it foo.cpp or foo.c or whether I use icc or icpc. The only way I can figure to turn off -Wshadow, which I prefer to use.

The program looks like this (one line):

void testloop (char *a, int N) { _Cilk_for(int i=0; i

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

Thanks Bradley,

Yes I can reprodcue your case here.
I will submit this issue to our engineering team for more investigation.

Thanks,
Wise

This issue appears to be resolved in the icc 12.1.0 20110518 (which I have as a beta).Thanks.-Bradley

Leave a Comment

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