summaryrefslogtreecommitdiffstats
path: root/test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp
blob: 686aac2802adafa0d35f3f4390f6d61b3fbc651e (plain)
1
2
3
4
5
6
// RUN: %clang_cc1 -std=c++11 -verify %s

alignas(double) void f(); // expected-error {{'alignas' attribute only applies to variables, data members and tag types}}
alignas(double) unsigned char c[sizeof(double)]; // expected-note {{previous}}
extern unsigned char c[sizeof(double)];
alignas(float) extern unsigned char c[sizeof(double)]; // expected-error {{different alignment}}