Closed
Description
On the following code:
#include <assert.h>
unsigned cnt = 0;
struct Foo {
//int i;
};
class Box
{
unsigned * monitor;
Foo f;
void op()
{
assert(monitor == &cnt);
*monitor = 1;
}
};
class Container
{
Box boxes[1];
};
int main()
{
Container c;
c.boxes[0].monitor = &cnt;
c.boxes[0].op();
assert(cnt == 0u);
return 0;
}
depending on if Foo f;
exists (try commenting it out), the checker does or doesn't work (despite the fact that Foo
is empty.
Metadata
Metadata
Assignees
Labels
No labels