Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7953 Discussions

Compiling boost::lexical_cast with Intel Compiler with optimizations causes a win32 exception

bstrouse
Beginner
673 Views
This was mentioned a few months ago by another poster, but I saw no resolution for his post:
http://software.intel.com/en-us/forums/showthread.php?t=81574&o=a&s=lr&wapkw=%28Intel+Threading+Tools+Boost+Performance%29

Here is my simple program:

#include
#include
#include

int main()
{

int digit = 5;
try
{
std::string digitString = boost::lexical_cast<:STRING>(digit);
}
catch (boost::bad_lexical_cast &ex)
{
std::cout << "Exception: " << ex.what() << std::endl;
}


}

When I compile this program in debug mode of MS visual studio 2008, the program runs successfully. However, in release mode with any optimizations turned on, the program produces an unhandled win32 exception. Compiling the same program in debug and release mode with O2 (optimize for speed) using the visual C++ compiler in visual studio successfully runs the program with no exceptions.

Is this a bug in the Intel compiler regarding boost::lexical_cast?

Thanks.
0 Kudos
2 Replies
JenniferJ
Moderator
673 Views

I did some investigating. the issue is related to /Qipo. Original posting has /Qipo.

Checked with /Qip, it worked. please use the /Qip for now. I will file a bug report about it.

thanks for reporting again.
Jennifer

0 Kudos
JenniferJ
Moderator
673 Views
This issue does not happen with 12.1 any more. Some other fixes solved the issue.

Please use the Intel C++ Composer XE 12.0 update 6 orupdate 7.

Thanks,
Jennifer
0 Kudos
Reply