commit 9eab7159e57ac633387066c1d239e651a3c45f4c
Author: Rodrigo Rebello <rprebello@gmail.com>
AuthorDate: Thu Oct 22 11:29:55 2015 -0200
Commit: Rodrigo Rebello <rprebello@gmail.com>
CommitDate: Mon Oct 26 01:25:39 2015 -0200
Fix "`gcc_struct' attribute directive ignored" warnings
Compilation for target architectures other than i386, x86_64 or PowerPC
(e.g. ARM) caused multiple warnings like the following to appear:
doomdata.h:75:1: warning: ‘gcc_struct’ attribute directive ignored
} PACKEDATTR mapsidedef_t;
^
This was due to 'gcc_struct' being undefined for these architectures.
Since that attribute was actually introduced by commit 87db726b9a9ae61ca
to address the fact that -mms-bitfields became the default for GCC on
Windows, limit it to that case.
---
src/doomtype.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/doomtype.h b/src/doomtype.h
index 4dc11061..7415e09c 100644
--- a/src/doomtype.h
+++ b/src/doomtype.h
@@ -52,10 +52,10 @@
#ifdef __GNUC__
-#ifdef __clang__
-#define PACKEDATTR __attribute__((packed))
-#else
+#if defined(_WIN32) && !defined(__clang__)
#define PACKEDATTR __attribute__((packed,gcc_struct))
+#else
+#define PACKEDATTR __attribute__((packed))
#endif
#else