Scenario1A: When class X inherits from A, B, and C; and A and C are empty classes, then gcc properly creates X such that: sizeof(X) == sizeof(B)
Scenario1B: When class X inherits from A and B; and A is an empty class, then gcc properly creates X such that: sizeof(X) == sizeof(B) Scenario2A: When class X inherits from A, B, and C; and A and C are empty classes inheriting from another empty class, then gcc IMPROPERLY creates X such that: sizeof(X) > sizeof(B) Scenario2B: When class X is a composite of A and B; and A is an empty class inheriting from another empty class, then gcc properly creates X such that: sizeof(X) == sizeof(B) -- Summary: zero-size base class optimization fails in certain scenarios Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: navinkumar+bugs at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39981