Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Invalid inheriting in ICC

Bert_Jonson
Beginner
140 Views

http://ideone.com/EANg6I

Subject. This code compiles on ICC 13 update 1 on windows, but it must not bacause 'A::foo' not accessible because 'B' uses 'private' to inherit from 'A'.

0 Kudos
1 Reply
Judith_W_Intel
Employee
140 Views
Yes we should give an accessibility error for this when imiiating more recent Microsoft compilers. It looks like MSVC++ 98 and earlier had a bug where they allowed this and we are incorrectly imitating this bug for all microsoft versions. I have entered DPD200239865 in our bug tracking system to fix this. Thanks for reporting it. Judy
Reply