[cfe-commits] [QUESTION] - funky declaration
John Thompson
john.thompson.jtsoftware at gmail.com
Mon Jul 26 16:15:28 PDT 2010
And also this one (bug 7109):
class test
{
public:
test();
int member;
};
class testStruct
{
public:
testStruct();
test t;
};
int i = __builtin_offsetof (testStruct, t);
>clang -cc1 offsetof1.cpp
offsetof1.cpp:15:9: warning: offset of on non-POD type 'testStruct'
int i = __builtin_offsetof (testStruct, t);
^ ~
1 warning generated.
---
Or is it because neither class is strictly POD?
This still has the warning:
struct test
{
public:
test();
int member;
};
struct testStruct
{
test t;
};
int i = __builtin_offsetof (testStruct, t);
But this does not:
struct test
{
int member;
};
struct testStruct
{
test t;
};
int i = __builtin_offsetof (testStruct, t);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100726/ab3fc367/attachment.html>
More information about the cfe-commits
mailing list