- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may use -wd279 compiler option to disable the warning.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page