[PATCH] D14872: PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 2 07:56:59 PST 2015


aaron.ballman added inline comments.

================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2788
@@ +2787,3 @@
+def warn_attribute_packed_for_bitfield : Warning<
+  "'packed' attribute was ignored on bit-fields with alignment 1 "
+  "in older versions of GCC and Clang">,
----------------
Would this read better as "on bit-fields with single-byte alignment" instead of "on bit-fields with alignment 1"?

================
Comment at: test/Sema/struct-packed-align.c:155
@@ +154,3 @@
+#if defined(_WIN32)
+// On Windows clang ignores uses MSVC compatible layout in this case.
+extern int o1[sizeof(struct packed_chars) == 3 ? 1 : -1];
----------------
"ignores uses" -> "uses"


http://reviews.llvm.org/D14872





More information about the cfe-commits mailing list