cxx11.cpp 592 B

12345678910111213141516171819202122232425
  1. // RUN: rm -rf %t
  2. // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 %s
  3. // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules -fmodules-cache-path=%t %s
  4. // This test fails on systems with older OS X 10.9 SDK headers, see PR18322.
  5. #include <stdalign.h>
  6. #if defined alignas
  7. #error alignas should not be defined in C++
  8. #endif
  9. #if defined alignof
  10. #error alignof should not be defined in C++
  11. #endif
  12. static_assert(__alignas_is_defined, "");
  13. static_assert(__alignof_is_defined, "");
  14. #include <stdint.h>
  15. #ifndef SIZE_MAX
  16. #error SIZE_MAX should be defined in C++
  17. #endif