Software Archive
Read-only legacy content
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
17065 Discussions

icc cilk_for produces gratuitous warning on -Wshadow

BradleyKuszmaul
Beginner
122 Views
This seems to be true for both icc
12.0.020101006
and
12.0.0 20100512
If 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=0;

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=0; }

0 Kudos
2 Replies
Lingfeng_C_Intel
Employee
122 Views
Thanks Bradley,

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

Thanks,
Wise
BradleyKuszmaul
Beginner
122 Views
This issue appears to be resolved in the icc 12.1.0 20110518 (which I have as a beta).
Thanks.
-Bradley
Reply