]> granicus.if.org Git - clang/commit
MS ABI: Add an additional test for empty structs in C
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 3 Oct 2014 07:41:09 +0000 (07:41 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 3 Oct 2014 07:41:09 +0000 (07:41 +0000)
commita5472dedd95b353727d89a932c637cef19e95124
tree1346481161b58fbb4623731ce994883f8e40b994
parentce45d89ed0142f2d13d3e1e09128290a0e5399b7
MS ABI: Add an additional test for empty structs in C

Empty structs in C differ from those in C++.
- C++ requires that empty types have size 1; alignment requirements may
  increase the size of the struct.
- The C implementation doesn't let empty structs have a size under 4
  bytes.  Again, alignment requirements may increase the struct's size.

Add a test to stress these differences.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218963 91177308-0d34-0410-b5e6-96231b3b80d8
test/Layout/ms-x86-empty-layout.c [new file with mode: 0644]