Community
cancel
Showing results for 
Search instead for 
Did you mean: 
mansr
Beginner
68 Views

icc 12.1 (update 6) -Wdeclaration-after-statement warns on every function

[plain]$ cat foo.c
void foo(void)
{
    int n;
}
$ icc -Wdeclaration-after-statement -c foo.c
foo.c(3): warning #311: declaration may not appear after executable statement in block
      int n;
      ^

$ icc --version
icc (ICC) 12.1.0 20110811
Copyright (C) 1985-2011 Intel Corporation.  All rights reserved.

[/plain]
This does not happen with any other release.
0 Kudos
1 Reply
Om_S_Intel
Employee
68 Views

I have reproduced the issue. I have submitted a report to Intel compiler development team. I will update the thread when I have more information on this.

Reply