| Chandler Carruth | 2c93cb2 | 2013-09-20 21:12:25 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 %s |
| Alp Toker | 7591a05 | 2014-04-19 19:07:19 +0000 | [diff] [blame^] | 2 | // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules %s |
| Richard Smith | 8acb404 | 2013-02-21 02:17:58 +0000 | [diff] [blame] | 3 | |
| Alp Toker | 7591a05 | 2014-04-19 19:07:19 +0000 | [diff] [blame^] | 4 | // This test fails on systems with older OS X 10.9 SDK headers, see PR18322. |
| Nico Weber | 428a93b | 2013-12-24 20:48:13 +0000 | [diff] [blame] | 5 | |
| Richard Smith | 8acb404 | 2013-02-21 02:17:58 +0000 | [diff] [blame] | 6 | #include <stdalign.h> |
| 7 | |
| 8 | #if defined alignas |
| 9 | #error alignas should not be defined in C++ |
| 10 | #endif |
| 11 | |
| 12 | #if defined alignof |
| 13 | #error alignof should not be defined in C++ |
| 14 | #endif |
| 15 | |
| 16 | static_assert(__alignas_is_defined, ""); |
| 17 | static_assert(__alignof_is_defined, ""); |
| Richard Smith | 2362829 | 2013-04-12 22:11:07 +0000 | [diff] [blame] | 18 | |
| 19 | |
| 20 | #include <stdint.h> |
| 21 | |
| 22 | #ifndef SIZE_MAX |
| 23 | #error SIZE_MAX should be defined in C++ |
| 24 | #endif |