gsdx: debug compilation fix

I'm not sure gcc behavior is correct here!
This commit is contained in:
Gregory Hainaut 2014-11-11 20:54:34 +01:00
parent 0ca9bab8b6
commit b6a951a9fa
1 changed files with 29 additions and 0 deletions

View File

@ -2970,6 +2970,34 @@ public:
}
#ifdef __linux__
#if 0
// Debug build error, _mm_extract_ps is actually a macro that use an anonymous union
// that contains i. I decide to rename the template on linux but it makes windows unhappy
// Hence the nice ifdef
//
// Code extract:
// union { int i; float f; } __tmp;
GSVector.h:2977:40: error: declaration of int GSVector4::extract32() const::<anonymous union>::i
return _mm_extract_ps(m, i);
GSVector.h:2973:15: error: shadows template parm int i
template<int i> __forceinline int extract32() const
#endif
template<int index> __forceinline int extract32() const
{
#if _M_SSE >= 0x401
return _mm_extract_ps(m, index);
#else
return i32[index];
#endif
}
#else
template<int i> __forceinline int extract32() const
{
#if _M_SSE >= 0x401
@ -2982,6 +3010,7 @@ public:
#endif
}
#endif
__forceinline static GSVector4 zero()
{