Community
cancel
Showing results for 
Search instead for 
Did you mean: 
SergeyKostrov
Valued Contributor II
178 Views

Remark #174: expression has no effect - RESOLVED

Please take a look at a Test-Case:

...
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
...

------ Build started: Project: IccTestApp, Configuration: Release Win32 ------
Compiling with Intel C++ Compiler XE 12.1.3.300 [IA-32]... (Intel C++ Environment)
IccTestApp.cpp
../Common/PrtTests.cpp(5788): remark #174: expression has no effect
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
^
...

My question is: Why "the expression has no effect"?

Development Environment:

OS: Windows XP 32-bit
IDE: Visual Studio 2005 SP1
Compilers: Intel C++ / Microsoft C++ / Borland C++ / MinGW / Turbo C++

Best regards,
Sergey

0 Kudos
2 Replies
Om_S_Intel
Employee
178 Views

Could you please attach the testcase?
SergeyKostrov
Valued Contributor II
178 Views

Could you please attach the testcase?


You need to include a 'crtdbg.h' header file and in a Release configurationwith Warning Level 5you should see
that remark.

However, Iunderstoodwhy it happens because for Release the declaration of '_CrtSetDbgFlag'in 'crtdbg.h'looks like:

...
#define _CrtSetDbgFlag( f ) ((int)0)
...

Thank you for your time!

Best regards,
Sergey

Reply