mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-30 08:49:04 -04:00

assume that ::operator new provides no more alignment than is necessary for any primitive type, except when we're on a GNU OS, where glibc's malloc guarantees to provide 64-bit alignment on 32-bit systems and 128-bit alignment on 64-bit systems. This can be controlled by the command-line -fnew-alignment flag. llvm-svn: 282974
10 lines
357 B
C++
10 lines
357 B
C++
// RUN: %clang_cc1 -std=c++1z %s -verify -triple x86_64-linux-gnu -DALIGN=16
|
|
// RUN: %clang_cc1 -std=c++1z %s -verify -fnew-alignment=2 -DALIGN=2
|
|
// RUN: %clang_cc1 -std=c++1z %s -verify -fnew-alignment=256 -DALIGN=256
|
|
|
|
// expected-no-diagnostics
|
|
|
|
#if ALIGN != __STDCPP_DEFAULT_NEW_ALIGNMENT__
|
|
#error wrong value for __STDCPP_DEFAULT_NEW_ALIGNMENT__
|
|
#endif
|