When a bit cast expression has pointer type, don't assume that the subexpression also has pointer type. It is possible that the subexpression is a value type instead. This patch checks the type of the subexpression and calls the proper function. Prevents the assertion failure reported in PR20110.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Have the bit cast return a null pointer if the sub expression is not a pointer. Also note in the test that the template definitions should produce an error in C++11 mode.