Diagnostic 10182: disabling optimization; runtime debug checks enabled

Submit New Article

November 12, 2008 2:00 PM PST


Problem : The compiler issues the message if runtime checks are enabled with /RTCx or /GZ(deprecated) and an optimization option are used together. Runtime checks are only performed on unoptimized code, so the compiler will disable all optimization options.
#include <iostream>
using namespace std;

void main(){
   cout << "Hello World" << endl;
}
>icl /RTC1 /fast hello.cpp
Intel(R) C++ Compiler XE for applications running on IA-32, Version 12.0.4.196 Build 20110427
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.

icl: warning #10182: disabling optimization; runtime debug checks enabled
hello.cpp


Resolution : Runtime checks should only be used in development state. For release builds the option should not be used. Because of the included runtime checks the code will be larger and slower than a build with only /Od.

So use for release builds:
>icl /fast hello.cpp
and for development builds:
>icl /RTC1 hello.cpp


Do you need more help?


This article applies to: Intel® C++ Compiler for Linux* Knowledge Base,   Intel® C++ Compiler for Mac OS X* Knowledge Base,   Intel® C++ Compiler for Windows* Knowledge Base,   Intel® Parallel Composer Knowledge Base