ahatanak added a comment.

It looks like gcc started rejecting the code relatively recently (11.1).

Also, I found out that MSVC doesn't reject the following code:

  struct T0 { char c; };
  struct T2 : virtual T0 { };
  T2 array[2];

The size of `T2` is 5 and its alignment is 4. The size of `array` is 10 bytes.

https://godbolt.org/z/c1EzdYqPc


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133711/new/

https://reviews.llvm.org/D133711

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to