1 From d9c517d9a4e168c1f7ed28ad0eb9365d69f5ceb2 Mon Sep 17 00:00:00 2001
2 From: Rodrigo Rebello <rprebello@gmail.com>
3 Date: Thu, 22 Oct 2015 11:29:55 -0200
4 Subject: [PATCH] Fix "`gcc_struct' attribute directive ignored" warnings
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Compilation for target architectures other than i386, x86_64 or PowerPC
10 (e.g. ARM) caused multiple warnings like the following to appear:
12 doomdata.h:75:1: warning: ‘gcc_struct’ attribute directive ignored
13 } PACKEDATTR mapsidedef_t;
16 This was due to 'gcc_struct' being undefined for these architectures.
17 Since that attribute was actually introduced by commit 87db726b9a9ae61ca
18 to address the fact that -mms-bitfields became the default for GCC on
19 Windows, limit it to that case.
21 Upstream-status: accepted, not yet released.
22 https://github.com/chocolate-doom/chocolate-doom/pull/629
24 Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
26 src/doomtype.h | 6 +++---
27 1 file changed, 3 insertions(+), 3 deletions(-)
29 diff --git a/src/doomtype.h b/src/doomtype.h
30 index bf0a40e..77c026c 100644
38 -#define PACKEDATTR __attribute__((packed))
40 +#if defined(_WIN32) && !defined(__clang__)
41 #define PACKEDATTR __attribute__((packed,gcc_struct))
43 +#define PACKEDATTR __attribute__((packed))