Displaying 3 results from an estimated 3 matches for "derived_int_ptr".
2018 Mar 19
4
RFC: Devirtualization v2
.../*
base_int_ptr = inttoptr base_int = inttoptr (ptrtoint (strip base)) = strip
base */ base_int_ptr->vfun(); ... Derived *derived = std::launder(base);
uintptr_t derived_int = (uintptr_t)derived; /* derived_int = ptrtoint
(strip derived) */ /* Note: base_int == derived_int */ .... Base
*derived_int_ptr = (Base*)derived_int; /* derived_int_ptr = inttoptr
(ptrtoint (strip derived)) */ /* Note: base_int_ptr == derived_int_ptr */
derived_int_ptr->vfun(); /* BUG: But it's different than
base_int_ptr->vfun()! */}*
-------------- next part --------------
An HTML attachment was scrubbed......
2018 Mar 28
0
[cfe-dev] RFC: Devirtualization v2
...(ptrtoint (strip base)) = strip base */
> base_int_ptr->vfun();
> ...
> Derived *derived = std::launder(base);
> uintptr_t derived_int = (uintptr_t)derived;
> /* derived_int = ptrtoint (strip derived) */
> /* Note: base_int == derived_int */
> ....
> Base *derived_int_ptr = (Base*)derived_int;
> /* derived_int_ptr = inttoptr (ptrtoint (strip derived)) */
> /* Note: base_int_ptr == derived_int_ptr */
> derived_int_ptr->vfun();
> /* BUG: But it's different than base_int_ptr->vfun()! */
> }
>
>
> _____________________________...
2018 Mar 29
2
[cfe-dev] RFC: Devirtualization v2
...nttoptr base_int = inttoptr (ptrtoint (strip base)) = strip
> base */ base_int_ptr->vfun(); ... Derived *derived = std::launder(base);
> uintptr_t derived_int = (uintptr_t)derived; /* derived_int = ptrtoint
> (strip derived) */ /* Note: base_int == derived_int */ .... Base
> *derived_int_ptr = (Base*)derived_int; /* derived_int_ptr = inttoptr
> (ptrtoint (strip derived)) */ /* Note: base_int_ptr == derived_int_ptr */
> derived_int_ptr->vfun(); /* BUG: But it's different than
> base_int_ptr->vfun()! */}*
> _______________________________________________
> cf...