mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 05:30:13 +03:00
Move dmd files into compiler/
This commit is contained in:
parent
20bd0cacbd
commit
6374bb87b7
4579 changed files with 4 additions and 4 deletions
18
compiler/test/compilable/alignas.c
Normal file
18
compiler/test/compilable/alignas.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Test _Alignas
|
||||
|
||||
int printf(const char *, ...);
|
||||
|
||||
_Alignas(4) _Alignas(8) _Alignas(0) int x = 5;
|
||||
//_Static_assert(_Alignof(x) == 8, "in");
|
||||
|
||||
_Alignas(int) short y = 6;
|
||||
//_Static_assert(_Alignof(y) == 4, "in");
|
||||
|
||||
struct S
|
||||
{
|
||||
_Alignas(2) char d;
|
||||
_Alignas(int) char c;
|
||||
};
|
||||
|
||||
struct S s = { 1, 2 };
|
||||
_Static_assert(sizeof(struct S) == 8, "in");
|
Loading…
Add table
Add a link
Reference in a new issue