]> granicus.if.org Git - clang/commitdiff
There is no such thing as __attribute__((align)); that's a __declspec attribute....
authorAaron Ballman <aaron@aaronballman.com>
Mon, 13 Jan 2014 21:30:03 +0000 (21:30 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 13 Jan 2014 21:30:03 +0000 (21:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199141 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/attr-aligned.c
test/Sema/types.c
test/SemaTemplate/attributes.cpp

index 92f2742d2f2234bd645da691029b20155a735d66..c094ff172dd59cfd3fddb9c1cadef7236d6b0b5e 100644 (file)
@@ -32,7 +32,7 @@ struct D { int member __attribute__((aligned(2))) __attribute__((packed)); } d;
 char d1[__alignof__(d) == 2 ?: -1] = {0};
 char d2[__alignof__(d.member) == 2 ?: -1] = {0};
 
-struct E { int member __attribute__((align(2))); } __attribute__((packed));
+struct E { int member __attribute__((aligned(2))); } __attribute__((packed));
 struct E e;
 char e1[__alignof__(e) == 2 ?: -1] = {0};
 char e2[__alignof__(e.member) == 2 ?: -1] = {0};
index 0abd148ce176105643bcc2e3ee5554e8c9cd9a75..339788eb9dfc5695c72dd8d392cc97b7c4a844f3 100644 (file)
@@ -53,7 +53,7 @@ _Decimal32 x;  // expected-error {{GNU decimal type extension not supported}}
 int __attribute__ ((vector_size (8), vector_size (8))) v;  // expected-error {{invalid vector element type}}
 
 void test(int i) {
-  char c = (char __attribute__((align(8)))) i; // expected-warning {{'align' attribute ignored when parsing type}}
+  char c = (char __attribute__((aligned(8)))) i; // expected-warning {{'aligned' attribute ignored when parsing type}}
 }
 
 // http://llvm.org/PR11082
index 5a06a706aa84fea4e96e9c53698dcaa606179d2f..1d46058b0191adad300c2661a370af81db415e96 100644 (file)
@@ -22,7 +22,7 @@ namespace attribute_aligned {
   template<unsigned Size, unsigned Align>
   class my_aligned_storage
   {
-    __attribute__((align(Align))) char storage[Size];
+    __attribute__((aligned(Align))) char storage[Size];
   };
   
   template<typename T>