diff --git a/LibCarla/source/compiler/disable-ue4-macros.h b/LibCarla/source/compiler/disable-ue4-macros.h index 542f845da..fec666821 100644 --- a/LibCarla/source/compiler/disable-ue4-macros.h +++ b/LibCarla/source/compiler/disable-ue4-macros.h @@ -13,8 +13,10 @@ #pragma push_macro("check") #undef check -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wmissing-braces" +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wmissing-braces" +#endif #define LIBCARLA_INCLUDED_FROM_UE4 diff --git a/LibCarla/source/compiler/enable-ue4-macros.h b/LibCarla/source/compiler/enable-ue4-macros.h index 1e10a4692..79de5ef0d 100644 --- a/LibCarla/source/compiler/enable-ue4-macros.h +++ b/LibCarla/source/compiler/enable-ue4-macros.h @@ -7,6 +7,8 @@ #pragma pop_macro("check") #pragma pop_macro("TEXT") -#pragma clang diagnostic pop +#if defined(__clang__) +# pragma clang diagnostic pop +#endif #undef LIBCARLA_INCLUDED_FROM_UE4