- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page