- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I downloaded the Smoke demo program. When compiling withIntel C++ 11.0.066on x64/Debugproject OgreMainmany files receive
warning #279: controlling expression is constant
Example
The error message occures on the assert line. Must have something to do with "const" yet the expression is not constant due to min and max not being known at compile time.
Jim
warning #279: controlling expression is constant
Example
[cpp]inline void setExtents( const Vector3& min, const Vector3& max ) { assert( (min.x <= max.x && min.y <= max.y && min.z <= max.z) && "The minimum corner of the box must be less than or equal to maximum corner" ); mExtent = EXTENT_FINITE; mMinimum = min; mMaximum = max; } [/cpp]
The error message occures on the assert line. Must have something to do with "const" yet the expression is not constant due to min and max not being known at compile time.
Jim
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jimdempseyatthecove
I downloaded the Smoke demo program. When compiling with Intel C++ 11.0.066 on x64/Debug project OgreMain many files receive
warning #279: controlling expression is constant
Example
The error message occures on the assert line. Must have something to do with "const" yet the expression is not constant due to min and max not being known at compile time.
Jim
warning #279: controlling expression is constant
Example
[cpp]inline void setExtents( const Vector3& min, const Vector3& max )
{
assert( (min.x <= max.x && min.y <= max.y && min.z <= max.z) &&
"The minimum corner of the box must be less than or equal to maximum corner" );
mExtent = EXTENT_FINITE;
mMinimum = min;
mMaximum = max;
}
[/cpp]
The error message occures on the assert line. Must have something to do with "const" yet the expression is not constant due to min and max not being known at compile time.
Jim
Could you send the PATH as I don't find the same file in "/apps/intel/cce/11.0.074/samples/C++" PATH where ICC-v11.0 is installed.
Also, I am getting error messages while compiling it's "Samples/C++/vec_samples" & "/Samples/C++/optimize" example files, probably I didn't miss anything with simple icc compilation command and as recoomeded in it's comment within the file.
~BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
BR,
I am running on Windows and this application (Smoke) is not part of the C++ samples.
For others, my concern is if the compiler determines the enclosed expression assert((expression)) is constant, which it is not, then the optimization code will either remove the code all together or always call the assert debug routine.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Follow-up:
I saw on the Havok forum that tryHavok does not include x64 libraries. This should not affect the compilation to target x64 (the warning #279).
I installed the x32 version of Intel C++ and set the platform for Win32. Compiling the OgreMain using ICC x32 still gets the errors.
Using MS CV++ (VS 2005) compiles without these warnings.
Therefore I think either ICC has a bug or there is an issue with a #define when compiling using ICC
Jim Dempsey
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