1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c11 %s 2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -fmodules %s 3 // RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -ffreestanding %s 4 5 noreturn int f(); // expected-error 1+{{}} 6 7 #include <stdnoreturn.h> 8 #include <stdnoreturn.h> 9 #include <stdnoreturn.h> 10 11 int g(); 12 noreturn int g(); 13 int noreturn g(); 14 int g(); 15 16 #include <stdalign.h> 17 _Static_assert(__alignas_is_defined, ""); 18 _Static_assert(__alignof_is_defined, ""); 19 alignas(alignof(int)) char c[4]; 20 _Static_assert(__alignof(c) == 4, ""); 21 22 #define __STDC_WANT_LIB_EXT1__ 1 23 #include <stddef.h> 24 rsize_t x = 0; 25 _Static_assert(sizeof(max_align_t) >= sizeof(long long), ""); 26 _Static_assert(alignof(max_align_t) >= alignof(long long), ""); 27 _Static_assert(sizeof(max_align_t) >= sizeof(long double), ""); 28 _Static_assert(alignof(max_align_t) >= alignof(long double), ""); 29 30 // If we are freestanding, then also check RSIZE_MAX (in a hosted implementation 31 // we will use the host stdint.h, which may not yet have C11 support). 32 #ifndef __STDC_HOSTED__ 33 #include <stdint.h> 34 rsize_t x2 = RSIZE_MAX; 35 #endif 36 37