[cpp]class A {
public:
static int t;
};
char A::t;[/cpp]
ICC 13 update 1 on windows compiles this code, but mustn't.
BTW:
Why forum is too slow working?
Sometimes it gives:
Gateway Timeout
The proxy server did not receive a timely response from the upstream server.
Link Copied
Yeh, I can see the issue. thanks for letting us know.
VC2010 and VC2012 will issue an error. icl issued a warning instead. I'll submit to the compiler to look at.
icl warning:
u361639.cpp(7): warning #147: declaration is incompatible with "int A::t" (declared at line char A::t;
Not sure why the forum server is slow. If it still slow tomorrow, please let me know too.
Thanks!
Jennifer
This issue is fixed in 14.0 and later. Now ICL also emits the error:
test.cpp(6): error: declaration is incompatible with "int A::t" (declared at line 4)
char A::t;
^
Jennifer
For more complete information about compiler optimizations, see our Optimization Notice.