r254614 - Fix clang/test/Sema/struct-packed-align.c. "Windows" is not MS compiler.

NAKAMURA Takumi via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 3 08:03:34 PST 2015


Author: chapuni
Date: Thu Dec  3 10:03:34 2015
New Revision: 254614

URL: http://llvm.org/viewvc/llvm-project?rev=254614&view=rev
Log:
Fix clang/test/Sema/struct-packed-align.c. "Windows" is not MS compiler.

Modified:
    cfe/trunk/test/Sema/struct-packed-align.c

Modified: cfe/trunk/test/Sema/struct-packed-align.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/struct-packed-align.c?rev=254614&r1=254613&r2=254614&view=diff
==============================================================================
--- cfe/trunk/test/Sema/struct-packed-align.c (original)
+++ cfe/trunk/test/Sema/struct-packed-align.c Thu Dec  3 10:03:34 2015
@@ -151,7 +151,7 @@ struct packed_chars {
   char c:4;
 };
 
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(__declspec) // _MSC_VER is unavailable in cc1.
 // On Windows clang uses MSVC compatible layout in this case.
 extern int o1[sizeof(struct packed_chars) == 3 ? 1 : -1];
 extern int o2[__alignof(struct packed_chars) == 1 ? 1 : -1];




More information about the cfe-commits mailing list