From 348e01dc4bc16ac4543d54b722fb46dbdebcb1e3 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 26 Apr 2019 07:11:09 -0700 Subject: Work around a 32-bit GCC compiler bug --- Alc/fpu_modes.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Alc/fpu_modes.h') 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 */ -- cgit v1.2.3