From d42cef891c8a980e58dd95a8a25377ebe92137d1 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Fri, 11 Sep 2015 14:57:02 +0200 Subject: [PATCH] gsdx: remove ALIGN_STACK feature on GCC Stack is already aligned correctly. Besides GCC optimizes the variable so it doesn't have any effect except that it generates useless warnings. --- plugins/GSdx/stdafx.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/GSdx/stdafx.h b/plugins/GSdx/stdafx.h index 95cd699bc6..ed38710a96 100644 --- a/plugins/GSdx/stdafx.h +++ b/plugins/GSdx/stdafx.h @@ -228,7 +228,13 @@ struct aligned_free_second {template void operator()(T& p) {_aligned_fr #define countof(a) (sizeof(a) / sizeof(a[0])) +// GCC removes the variable as dead code and generates some warnings. +// Stack is automatically realigned due to SSE/AVX operations +#ifdef __GNUC__ +#define ALIGN_STACK(n) (void)0; +#else #define ALIGN_STACK(n) __aligned(int, n) __dummy; +#endif #ifndef RESTRICT