[cfe-commits] [PATCH] Fix for reinterpret_cast (bug 11747)

Aaron Ballman aaron at aaronballman.com
Sun Jan 15 18:18:05 PST 2012


On Sun, Jan 15, 2012 at 6:01 PM, David Blaikie <dblaikie at gmail.com> wrote:
> Test case?

Now attached, though it did point out one area I need some help
solving (I added a TODO in the patch).  We're not allowed to cast away
constness with this, but I can't figure out a reasonable way to do it
since we may not be dealing with pointer types.

~Aaron

>
> On Sun, Jan 15, 2012 at 1:45 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
>> This is a patch for fixing 11747, allowing reinterpret_cast to "cast"
>> where the source and destination types are the same as per
>> [expr.reinterpret.cast]p2.  The fix itself is fairly simple -- the
>> code was already there, it just needed to be moved up slightly since
>> the previous check was for source and dest being pointers.
>>
>> ~Aaron
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reinterpret_cast.patch
Type: application/octet-stream
Size: 2752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120115/ce685188/attachment.obj>


More information about the cfe-commits mailing list