Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
20 Views

warning #279: controlling expression is constant (still)

Since I did not manage to reply to the previous thread dealing with it (http://software.intel.com/en-us/forums/showthread.php?t=62941) I open a new one.

That piece of code:
#include
extern bool MaybeOrNot();
void foo()
{
assert(MaybeOrNot() && "That is strange");
}


shows the surprising warning:
icc -c warning279.cpp
warning279.cpp(5): warning #279: controlling expression is constant
assert(MaybeOrNot() && "That is strange");
^

with an icc 11.1 20101201 (on linux).
I appreciate that warning in general, but here I dislike it.

I also find http://software.intel.com/en-us/articles/cdiag279/ and other people on other websites complaining about the surprising message, so I'd like to have this behaviour changed.

Regards
Alexander
0 Kudos
1 Reply
Highlighted
Employee
20 Views

You may use -wd279 compiler option to disable the warning.
0 Kudos