Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions clang/test/Sema/struct-packed-align.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 %s -fsyntax-only -verify
// RUN: %clang_cc1 %s -fsyntax-only -triple=x86_64-windows-coff -verify
// RUN: %clang_cc1 %s -fsyntax-only -triple=x86_64-windows-gnu -verify
// RUN: %clang_cc1 %s -fsyntax-only -triple=x86_64-scei-ps4 -verify
// RUN: %clang_cc1 %s -fsyntax-only -triple=x86_64-sie-ps5 -verify

Expand Down Expand Up @@ -131,7 +132,7 @@ struct nS {
nt start_lba;
};

#if defined(_WIN32) && !defined(__declspec) // _MSC_VER is unavailable in cc1.
#if defined(_WIN32)
// Alignment doesn't affect packing in MS mode.
extern int n1[sizeof(struct nS) == 16 ? 1 : -1];
extern int n2[__alignof(struct nS) == 8 ? 1 : -1];
Expand Down Expand Up @@ -159,7 +160,7 @@ struct packed_chars {
char f : 4, g : 8, h : 8, i : 8;
};

#if (defined(_WIN32) || defined(__SCE__)) && !defined(__declspec) // _MSC_VER is unavailable in cc1.
#if defined(_WIN32) || defined(__SCE__)
// On Windows clang uses MSVC compatible layout in this case.
//
// Additionally, test for pre-r254596 clang behavior on the PS4/PS5 targets.
Expand Down