| September 7, 2011 12:00 AM PDT | |
int main() {
int i;
i = 1;
printf("Here we go\n");
int j;
j = i;
}
>icl -c t.c
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.1.0.233 Build 20110811
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
t.c
t.c(6): error: declaration may not appear after executable statement in block
int j;
^
compilation aborted for t.c (code 2)
To be able to declare variables after executable statements rather than having to declare all of them up front you will need to compile per C99 specification using the compiler option /Qstd=c99 as shown below:
>icl -c t.c -Qstd=c99
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.1.0.233 Build 20110811
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
t.c
>
This article applies to: Intel® C++ Compiler for Windows* Knowledge Base, Intel® Parallel Composer Knowledge Base
For more complete information about compiler optimizations, see our Optimization Notice.


