Explorar o código

COMP: Embed Gcc specific pragma in #ifdef __GCC__ to avoid complaints from other compiler

Jean-Christophe Fillion-Robin %!s(int64=15) %!d(string=hai) anos
pai
achega
5065f572e9
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      Libs/Scripting/Python/Widgets/ctkPythonShell.cpp

+ 2 - 0
Libs/Scripting/Python/Widgets/ctkPythonShell.cpp

@@ -68,10 +68,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <ctkAbstractPythonManager.h>
 #include <ctkAbstractPythonManager.h>
 #include "ctkPythonShell.h"
 #include "ctkPythonShell.h"
 
 
+#ifdef __GNUC__
 // Disable warnings related to Python macros and functions
 // Disable warnings related to Python macros and functions
 // See http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
 // See http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
 // Note: Ideally the incriminated functions and macros should be fixed upstream ...
 // Note: Ideally the incriminated functions and macros should be fixed upstream ...
 #pragma GCC diagnostic ignored "-Wold-style-cast"
 #pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
 
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 class ctkPythonShellCompleter : public ctkConsoleWidgetCompleter
 class ctkPythonShellCompleter : public ctkConsoleWidgetCompleter