Clang seems not to do empty base class optimization in this scenario:
struct A { }; //sizeof(A) == 1 -> OK
struct B : public A { int _intValue; };//sizeof(B) == 4 -> OK, EBCO works here
struct C : public A { B _bValue; }; //sizeof(C) == 8 -> ??? Not OK
It seems g++ behaves the same (or similar) way. Is this normal? I think EBCO should kick in here.
Am I missing something that would make it illegal here?