On 09/15/2014 11:55 AM, Ulrich Weigand wrote:
(https://gcc.gnu.org/ml/gcc/2014-06/msg00116.html)

From the __builtin_object_size documentation, it's not immediately
clear to me whether this is supposed to work or not:

   If the least significant
   bit is clear, objects are whole variables, if it is set, a closest
   surrounding subobject is considered the object a pointer points to.

Is the presence of the above cast (explicit or implicit) supposed to
modify the notion of "closest surrounding subobject"?

IMO, yes. A base class subobject is a subobject, so since the least significant bit is set, it seems to me that GCC is correctly returning the size of that subobject.

Jason

Reply via email to