minix/external/bsd/llvm/dist/clang/test/Headers/c11.c
Erik van der Kouwe 35a4831d02 clang: apply LLVM patch r201729
This fixes an issue when compiling with GCC 4.9.
For details, see: http://reviews.llvm.org/rL201729

Change-Id: Iaa522715798016f6edb433b01b02aa664fcb5d1c
2015-06-29 10:58:16 +00:00

36 lines
1.1 KiB
C

// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -fmodules %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -ffreestanding %s
noreturn int f(); // expected-error 1+{{}}
#include <stdnoreturn.h>
#include <stdnoreturn.h>
#include <stdnoreturn.h>
int g();
noreturn int g();
int noreturn g();
int g();
#include <stdalign.h>
_Static_assert(__alignas_is_defined, "");
_Static_assert(__alignof_is_defined, "");
alignas(alignof(int)) char c[4];
_Static_assert(__alignof(c) == 4, "");
#define __STDC_WANT_LIB_EXT1__ 1
#include <stddef.h>
rsize_t x = 0;
_Static_assert(sizeof(max_align_t) >= sizeof(long long), "");
_Static_assert(alignof(max_align_t) >= alignof(long long), "");
_Static_assert(sizeof(max_align_t) >= sizeof(long double), "");
_Static_assert(alignof(max_align_t) >= alignof(long double), "");
// If we are freestanding, then also check RSIZE_MAX (in a hosted implementation
// we will use the host stdint.h, which may not yet have C11 support).
#ifndef __STDC_HOSTED__
#include <stdint.h>
rsize_t x2 = RSIZE_MAX;
#endif