2012-07-01 05:33:57 +08:00
|
|
|
// RUN: %clang_cc1 -std=c11 -fsyntax-only -verify %s
|
2014-10-21 07:26:58 +08:00
|
|
|
// RUN: not %clang_cc1 -std=c99 -pedantic -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXT %s
|
2011-09-30 02:04:28 +08:00
|
|
|
|
|
|
|
_Alignas(4) char c1;
|
|
|
|
unsigned _Alignas(long) char c2;
|
|
|
|
char _Alignas(16) c3;
|
|
|
|
|
2013-01-29 17:02:09 +08:00
|
|
|
char c4 _Alignas(32); // expected-error {{expected ';' after top level declarator}} expected-warning {{declaration does not declare anything}}
|
2012-07-01 05:33:57 +08:00
|
|
|
|
|
|
|
char _Alignas(_Alignof(int)) c5;
|
|
|
|
|
2019-08-27 21:47:51 +08:00
|
|
|
// CHECK-EXT: '_Alignas' is a C11 extension
|
|
|
|
// CHECK-EXT: '_Alignof' is a C11 extension
|