From: Roland Schulz Date: Wed, 10 Sep 2014 17:06:49 +0000 (-0400) Subject: Fix warnings for ICC 15 X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=d28edf2a07dcf11a71b46f0a5f82c811b506fa6d Fix warnings for ICC 15 Also add comment decribing all suppressed warnings Change-Id: Ib347a2ec1e4b890b8f115c56b1a982f9123a0adf --- diff --git a/cmake/gmxCFlags.cmake b/cmake/gmxCFlags.cmake index 6ad1bf83f5..aabadfbc59 100644 --- a/cmake/gmxCFlags.cmake +++ b/cmake/gmxCFlags.cmake @@ -142,14 +142,49 @@ MACRO(gmx_c_flags) if (CMAKE_C_COMPILER_ID MATCHES "Intel") if (NOT WIN32) if(NOT GMX_OPENMP) - GMX_TEST_CFLAG(CFLAGS_PRAGMA "-wd161" GMXC_CFLAGS) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 13.99.99) +# 3180: unrecognized OpenMP #pragma + GMX_TEST_CFLAG(CFLAGS_PRAGMA "-wd3180" GMXC_CFLAGS) + else() +# 161: unrecognized #pragma + GMX_TEST_CFLAG(CFLAGS_PRAGMA "-wd161" GMXC_CFLAGS) + endif() endif() +# 111: statement is unreachable +# 177: function ".." was declared but never referenced +# 181: argument of type ".." is incompatible with format "..", expecting argument of type ".." +# 193: zero used for undefined preprocessing identifier ".." +# 271: trailing comma is nonstandard +# 304: access control not specified ("public" by default) +# 383: value copied to temporary, reference to temporary used +# 424: extra ";" ignored +# 444: destructor for base class ".." is not virtual +# 522: function ".." redeclared "inline" after being called +# 593: variable ".." was set but never used +# 869: parameter ".." was never referenced +# 981: operands are evaluated in unspecified order +#1418: external function definition with no prior declaration +#1419: external declaration in primary source file +#1572: floating-point equality and inequality comparisons are unreliable +#1599: declaration hides variable ".." +#2259: non-pointer conversion from ".." to ".." may lose significant bits +#2415: variable ".." of static storage duration was declared but never referenced +#2547: ".." was specified as both a system and non-system include directory +#2557: comparison between signed and unsigned operands +#3280: declaration hides member ".." +#3346: dynamic exception specifications are deprecated GMX_TEST_CFLAG(CFLAGS_WARN "-w3 -wd111 -wd177 -wd181 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346" GMXC_CFLAGS) GMX_TEST_CFLAG(CFLAGS_STDGNU "-std=gnu99" GMXC_CFLAGS) GMX_TEST_CFLAG(CFLAGS_OPT "-ip -funroll-all-loops -alias-const -ansi-alias" GMXC_CFLAGS_RELEASE) + #documented to be default but not set for ICC15. Gives remarks that inlining is not possible because of max-size setting + GMX_TEST_CFLAG(CFLAGS_INLINE "-no-inline-max-size -no-inline-max-total-size" GMXC_CFLAGS) else() if(NOT GMX_OPENMP) - GMX_TEST_CFLAG(CFLAGS_PRAGMA "/wd161" GMXC_CFLAGS) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 13.99.99) + GMX_TEST_CFLAG(CFLAGS_PRAGMA "/wd3180" GMXC_CFLAGS) + else() + GMX_TEST_CFLAG(CFLAGS_PRAGMA "/wd161" GMXC_CFLAGS) + endif() endif() GMX_TEST_CFLAG(CFLAGS_WARN "/W3 /wd111 /wd177 /wd181 /wd193 /wd271 /wd304 /wd383 /wd424 /wd444 /wd522 /wd593 /wd869 /wd981 /wd1418 /wd1419 /wd1572 /wd1599 /wd2259 /wd2415 /wd2547 /wd2557 /wd3280 /wd3346" GMXC_CFLAGS) GMX_TEST_CFLAG(CFLAGS_OPT "/Qip" GMXC_CFLAGS_RELEASE) @@ -159,15 +194,27 @@ MACRO(gmx_c_flags) if (CMAKE_CXX_COMPILER_ID MATCHES "Intel") if (NOT WIN32) if(NOT GMX_OPENMP) - GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-wd161" GMXC_CXXFLAGS) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.99.99) + GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-wd3180" GMXC_CXXFLAGS) + else() + GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-wd161" GMXC_CXXFLAGS) + endif() endif() - GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-w3 -wd111 -wd177 -wd181 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346 -wd1782" GMXC_CXXFLAGS) +#All but the following warnings are identical for the C-compiler (see above) +#1782: #pragma once is obsolete +#2282: unrecognized GCC pragma + GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-w3 -wd111 -wd177 -wd181 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346 -wd1782 -wd2282" GMXC_CXXFLAGS) GMX_TEST_CXXFLAG(CXXFLAGS_OPT "-ip -funroll-all-loops -alias-const -ansi-alias" GMXC_CXXFLAGS_RELEASE) + GMX_TEST_CXXFLAG(CXXFLAGS_INLINE "-no-inline-max-size -no-inline-max-total-size" GMXC_CXXFLAGS) else() if(NOT GMX_OPENMP) - GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "/wd161" GMXC_CXXFLAGS) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.99.99) + GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "/wd3180" GMXC_CFLAGS) + else() + GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "/wd161" GMXC_CXXFLAGS) + endif() endif() - GMX_TEST_CXXFLAG(CXXFLAGS_WARN "/W3 /wd111 /wd177 /wd181 /wd193 /wd271 /wd304 /wd383 /wd424 /wd444 /wd522 /wd593 /wd869 /wd981 /wd1418 /wd1419 /wd1572 /wd1599 /wd2259 /wd2415 /wd2547 /wd2557 /wd3280 /wd3346 /wd1782" GMXC_CXXFLAGS) + GMX_TEST_CXXFLAG(CXXFLAGS_WARN "/W3 /wd111 /wd177 /wd181 /wd193 /wd271 /wd304 /wd383 /wd424 /wd444 /wd522 /wd593 /wd869 /wd981 /wd1418 /wd1419 /wd1572 /wd1599 /wd2259 /wd2415 /wd2547 /wd2557 /wd3280 /wd3346 /wd1782 /wd2282" GMXC_CXXFLAGS) GMX_TEST_CXXFLAG(CXXFLAGS_OPT "/Qip" GMXC_CXXFLAGS_RELEASE) endif() endif() diff --git a/src/external/boost/boost/exception/exception.hpp b/src/external/boost/boost/exception/exception.hpp index 31d43178df..98b6083120 100644 --- a/src/external/boost/boost/exception/exception.hpp +++ b/src/external/boost/boost/exception/exception.hpp @@ -5,6 +5,9 @@ #ifndef UUID_274DA366004E11DCB1DDFE2E56D89593 #define UUID_274DA366004E11DCB1DDFE2E56D89593 +#if defined(__ICC) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(disable:367) //GMX: For ICC15 "disable duplicate friend declaration" warning +#endif #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif