Fix GCC warning
authorAndrey Alekseenko <al42and@gmail.com>
Wed, 30 Jun 2021 08:33:20 +0000 (11:33 +0300)
committerAndrey Alekseenko <al42and@gmail.com>
Wed, 30 Jun 2021 08:33:20 +0000 (11:33 +0300)
src/gromacs/fft/gpu_3dfft.cpp

index 3f218e83760421166a68529bd1e0ff12999dfeda..3b896eb7967fad8bc8045d21fe26dee749046014 100644 (file)
@@ -50,8 +50,10 @@ namespace gmx
 {
 
 // [[noreturn]] attributes must be added in the common headers, so it's easier to silence the warning here
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wmissing-noreturn"
+#ifdef __clang__
+#    pragma clang diagnostic push
+#    pragma clang diagnostic ignored "-Wmissing-noreturn"
+#endif
 
 class Gpu3dFft::Impl
 {
@@ -78,6 +80,8 @@ void Gpu3dFft::perform3dFft(gmx_fft_direction /*dir*/, CommandEvent* /*timingEve
     GMX_THROW(InternalError("Cannot run GPU routines in a CPU-only configuration"));
 }
 
-#pragma clang diagnostic pop
+#ifdef __clang__
+#    pragma clang diagnostic pop
+#endif
 
 } // namespace gmx