brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · b589631 Raw
43 lines · c
1// RUN: rm -rf %t2// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 %s3// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -fmodules -fmodules-cache-path=%t %s -D__STDC_WANT_LIB_EXT1__=14// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -ffreestanding %s5// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -triple i686-pc-win32 -fms-compatibility-version=17.00 %s6 7noreturn int f(void); // expected-error 1+{{}}8 9#include <stdnoreturn.h>10#include <stdnoreturn.h>11#include <stdnoreturn.h>12 13int g(void);14noreturn int g(void);15int noreturn g(void);16int g(void);17 18#include <stdalign.h>19_Static_assert(__alignas_is_defined, "");20_Static_assert(__alignof_is_defined, "");21alignas(alignof(int)) char c[4];22_Static_assert(__alignof(c) == 4, "");23 24#define __STDC_WANT_LIB_EXT1__ 125#include <stddef.h>26rsize_t x = 0;27_Static_assert(sizeof(max_align_t) >= sizeof(long long), "");28_Static_assert(alignof(max_align_t) >= alignof(long long), "");29_Static_assert(sizeof(max_align_t) >= sizeof(long double), "");30_Static_assert(alignof(max_align_t) >= alignof(long double), "");31 32#ifdef _MSC_VER33_Static_assert(sizeof(max_align_t) == sizeof(double), "");34#endif35 36// If we are freestanding, then also check RSIZE_MAX (in a hosted implementation37// we will use the host stdint.h, which may not yet have C11 support).38#ifndef __STDC_HOSTED__39#include <stdint.h>40rsize_t x2 = RSIZE_MAX;41#endif42 43