aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-04-26 07:11:09 -0700
committerChris Robinson <[email protected]>2019-04-26 07:11:09 -0700
commit348e01dc4bc16ac4543d54b722fb46dbdebcb1e3 (patch)
tree1e297d600ddeb493ebbfe6bc541158c3c9d84023
parent725ceb128ed4cb48a039d2f32ae73f8c8dccabef (diff)
Work around a 32-bit GCC compiler bug
-rw-r--r--Alc/fpu_modes.h11
-rw-r--r--Alc/helpers.cpp4
2 files changed, 10 insertions, 5 deletions
diff --git a/Alc/fpu_modes.h b/Alc/fpu_modes.h
index 73e75965..5465e9cf 100644
--- a/Alc/fpu_modes.h
+++ b/Alc/fpu_modes.h
@@ -8,13 +8,18 @@ class FPUCtl {
bool in_mode{};
public:
- FPUCtl() noexcept;
- ~FPUCtl() { leave(); }
+ FPUCtl();
+ /* HACK: 32-bit targets for GCC seem to have a problem here with certain
+ * noexcept methods (which destructors are) causing an internal compiler
+ * error. No idea why it's these methods specifically, but this is needed
+ * to get it to compile.
+ */
+ ~FPUCtl() noexcept(false) { leave(); }
FPUCtl(const FPUCtl&) = delete;
FPUCtl& operator=(const FPUCtl&) = delete;
- void leave() noexcept;
+ void leave();
};
#endif /* FPU_MODES_H */
diff --git a/Alc/helpers.cpp b/Alc/helpers.cpp
index d9133842..1a62263e 100644
--- a/Alc/helpers.cpp
+++ b/Alc/helpers.cpp
@@ -262,7 +262,7 @@ void FillCPUCaps(int capfilter)
}
-FPUCtl::FPUCtl() noexcept
+FPUCtl::FPUCtl()
{
#if defined(HAVE_SSE_INTRINSICS)
this->sse_state = _mm_getcsr();
@@ -287,7 +287,7 @@ FPUCtl::FPUCtl() noexcept
this->in_mode = true;
}
-void FPUCtl::leave() noexcept
+void FPUCtl::leave()
{
if(!this->in_mode) return;