Compiler divergence when converting to ambiguous/inaccessible base rvalue

27 views
Skip to first unread message

johe...@gmail.com

unread,
Jun 11, 2018, 12:17:42 PM6/11/18
to ISO C++ Standard - Discussion
Greetings.

There is a compiler divergence (I tested with GCC and Clang) when converting to a base rvalue that's ambiguous/inaccessible. The wording in https://wg21.link/expr.static.cast#3 doesn't outright says that "the program is ill-formed," but it instead reads "a program that necessitates such a cast is ill-formed" in such cases. If the latter can be interpreted differently, could that be the reason for the divergence? See the LLVM bug 37691 and GCC bug 86105.

Thanks for reading.

johe...@gmail.com

unread,
Jun 11, 2018, 12:39:38 PM6/11/18
to ISO C++ Standard - Discussion, johe...@gmail.com
The rvalue to rvalue base case is covered by the next paragraph, http://eel.is/c++draft/expr.static.cast#4.
Reply all
Reply to author
Forward
0 new messages