[cfe-dev] double/virtual offsets for MSVC broken in 3.1
Don Williamson
don.williamson at yahoo.com
Thu Aug 30 03:26:11 PDT 2012
Hi,
last year I submitted a patch (commit by somebody else) to solve cases like this:
// The addition of a double anywhere in this struct forces the vtable ptr to occupy 4 bytes + 4 bytes padding in MSVC
struct DoubleInPolymorphicStruct
{
virtual void Empty() { }
int a;
double b;
};
The offset of a in MSVC is 8 bytes, but clang in MSVC offset calculation mode puts it at 4. The initial posts are here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/016944.html
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/016970.html
These changes did not make it into 3.0 but as far as I could tell, did make it into the trunk. However, I've just sync'ed up to the 3.1 release and this is still a problem.
I'm about to go back and take a look and what's broken but it'll take me a couple of hours to settle back into the code again.
Meanwhile, could anybody help with any ideas as to what may have changed?
Thanks!
- Don
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120830/6ca1f655/attachment.html>
More information about the cfe-dev
mailing list