瀏覽代碼

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

Jean-Christophe Fillion-Robin 15 年之前
父節點
當前提交
5065f572e9
共有 1 個文件被更改,包括 2 次插入0 次删除
  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 "ctkPythonShell.h"
 
+#ifdef __GNUC__
 // Disable warnings related to Python macros and functions
 // See http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
 // Note: Ideally the incriminated functions and macros should be fixed upstream ...
 #pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
 
 //----------------------------------------------------------------------------
 class ctkPythonShellCompleter : public ctkConsoleWidgetCompleter