https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83732
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Kenman Tsang from comment #6) > Sorry for bring this topic back again. That's OK, the bug is still open. > But I think there are some > inconsistancy with the std::is_pod and the error messages. Yes, that's what I said in comment 1 and comment 3. > Refers to my example. A1 is a POD, but the error message said it is > "non-POD". Should we either include more detail to the message (like C++98 > POD) or to relax the POD checking? See comment 4. > I tried the same case with clang. clang successfully compiles and return the > correct size. And I cannot found anyway to unify their behavior, hence I > cannot have a compiler independent code base Using the non-standard packed attribute already makes the code non-portable.