I had a similar problem with the Warning 186 some time ago. Please take a look at a thread:
http://software.intel.com/en-us/forums/showthread.php?t=105398&o=a&s=lr
There is something wrongwithanalysis of 'unsigned int' variables by Intel C++ compiler in your and my cases.
Best regards,
Sergey




A pointless pointless warning
Hello.This (ICL 12.1.4.325,/Wall):
template< unsigned threshold > bool fn( unsigned n ) { return n >= threshold; } int main() { fn< 1 >( 123 ); // ok fn< 0 >( 123 ); // warning #186: pointless comparison of unsigned integer with zero return 0; }Is the compiler suggesting that a separate specialization is needed for threshold==0? I think template arguments should be treated more like function arguments with regard to raising this diagnostic message, and less like literals.On another note, I'm still wondering about a minor point from one of my previous posts which was left uncommented probably due to not being stated clear enough. Here, of all the functions, only f1 gets "warning #2536: type qualifiers are meaningless here". It looks like there is some inconsistency regarding this warning.#include template< typename ptype > auto f1( ptype ptr ) -> decltype( *ptr ) const { return *ptr; } template< typename ptype > auto f2( ptype ptr ) -> int const { return *ptr; } template< typename ptype > std::remove_pointer< ptype >::type const f3( ptype ptr ) { return *ptr; } template< typename ptype > int const f4( ptype ptr ) { return *ptr; } int const f9( int *ptr ) { return *ptr; } void test() { int x = 123; f1( &x ); f2( &x ); f3( &x ); f4( &x ); f9( &x ); }----Best regards,Vladimir