r267534 - [MSVC] PR27337: allow static_cast from private base to derived for WTL

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 27 11:57:09 PDT 2016


On Wed, Apr 27, 2016 at 11:52 AM, Richard Smith <richard at metafoo.co.uk>
wrote:

> On Wed, Apr 27, 2016 at 11:50 AM, Stephan T. Lavavej via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
>> [Dmitry Polukhin]
>> > As for 'A*' to 'B*" case, indeed it is not very common and it looks
>> like someone just forgot to specify 'public'.
>>
>> If we're doing something gratuitously nonconformant in MS product code or
>> even sample code, you should report it to us, so we can fix it upstream,
>> instead of having to add more bug compatibility to clang, or tolerate known
>> failures when using clang on MS sample code.
>>
>> I don't have the context here (just subscribed to cfe-commits), but if
>> you can send me a self-contained writeup of where and what the problem is
>> in the WTL sample, I can go find the owner and report it to them. We can't
>> go back in time and fix released stuff, but we should be able to apply
>> simple fixes to future releases of products and samples.
>>
>
> You can find a description of the problem in llvm.org/PR27337
>

Brief summary:

The WTL bug is the missing 'public' on the second base class on this line:
https://sourceforge.net/p/wtl/code/HEAD/tree/trunk/wtl/Samples/MDIDocVw/mainfrm.h#l636

The C1xx bug is that it accepts a (non-C-style) cast from a base class to
an inaccessible derived class.

Thanks,
>> Stephan T. Lavavej
>> Senior Developer - Visual C++ Libraries
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160427/a7aa3bae/attachment.html>


More information about the cfe-commits mailing list