- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following Ansi-compliant code produces correct result for Microsoft* compilers (with /Za), but Intel C++ Compiler for Windows (with /Za) stillproduces wrong result. This behaviour difference between cl & icl compilers does not exist in a similar code that is posted in previous issue.
Please let me know what is the difference.
/////////////////////////////
[bash]#include#include #include using std::cout; using std::endl; void g() { cout << "global g()" << endl; } template class Y { public: void g() { cout << "Y<" << typeid(T).name() << ">::g()" << endl; } typedef int E; }; typedef double E; template class X : public Y { public: E f() { g(); return 0; } }; int main() { X x; cout << x.f() << endl; } [/bash]
/////////////////////////////////////////
Though the Intel C++ Compiler for Linux produces the correct result as intended.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, this looks like a bugsince Intel's /Za mode is notcompatible with Microsoft's /Za mode.
I will enter a bug report for this. Thanks for reporting it.
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Judy,
Thanks very much for considering it as a bug. Please provide a CQ number once you raise it.
Thanks very much for considering it as a bug. Please provide a CQ number once you raise it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Submitted as cq# DPD200153371
Judy
Judy

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