- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page