blob: 11bec195446200acfbc8d223cee512a434074be8 [file] [log] [blame]
Chandler Carruth2c93cb22013-09-20 21:12:25 +00001// 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
Richard Smith0015f092013-01-17 22:16:11 +00004
5noreturn int f(); // expected-error 1+{{}}
6
7#include <stdnoreturn.h>
8#include <stdnoreturn.h>
9#include <stdnoreturn.h>
10
11int g();
12noreturn int g();
13int noreturn g();
14int g();
Richard Smith4dab7092013-01-30 06:33:54 +000015
16#include <stdalign.h>
17_Static_assert(__alignas_is_defined, "");
18_Static_assert(__alignof_is_defined, "");
19alignas(alignof(int)) char c[4];
20_Static_assert(__alignof(c) == 4, "");
Daniel Dunbar95f1de32013-04-12 23:24:56 +000021
22#define __STDC_WANT_LIB_EXT1__ 1
23#include <stddef.h>
Daniel Dunbar50b8b552013-04-12 23:41:08 +000024rsize_t x = 0;
25
26// If we are freestanding, then also check RSIZE_MAX (in a hosted implementation
27// we will use the host stdint.h, which may not yet have C11 support).
28#ifndef __STDC_HOSTED__
Daniel Dunbar893f3d52013-04-17 21:11:07 +000029#include <stdint.h>
Daniel Dunbar50b8b552013-04-12 23:41:08 +000030rsize_t x2 = RSIZE_MAX;
31#endif
32