链接已复制
I couldn't find that error in the filed issues in the database. Could you please compile with the preprocessor option /P and attach the preprocessed .i file so I can try to reproduce the problem?
-thanks,
Kittur
I stripped it down to the following example:
--------------------------------------------------------------
#include
#include
class dummy
{
public:
void read(std::string s);
};
void dummy::read(std::string s)
{
__try
{
}
__finally
{
}
}
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
--------------------------------------------------------------
The error will appear on the opening { of the method void dummy::read(std::string s), only if a std::string is declared as a parameter and __try/__finally is used. try/catch works fine or a char* instead of a std::string works fine, too.
Well, I cannot reproduce the problem with the latest Intel Parallel Studio update 1 (release) on both 32 as well as the 62 bit arch as it compiles fine. Do you get the same output as I get in terms of the compiler version (see below). If not, could you let me know what build date and version you get with %icl /V
---------------------------------------------
Intel Parallel Studio 2011 Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Intel Parallel Composer 2011 Update 1 (package 096)
%icl test.cpp
Intel C++ Compiler XE for applications running on Intel 64, Version 12.0.1.096 Build 20101116
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
....
----------------------------------------------
-regards,
Kittur
guess I am missing update 1 for the composer:
--------------------------------------------------------------------------------
Intel Parallel Studio 2011
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Intel Parallel Amplifier 2011 Update 1 (build 127928)
Intel Parallel Inspector 2011 Update 1 (build 128785)
Intel Parallel Advisor 2011 Update 1 (build 124239)
Intel Parallel Composer 2011 (package 063)
Setting environment for using Microsoft Visual Studio 2010 x64 cross tools.
C:\Program Files (x86)\Intel\Parallel Studio 2011>icl
Intel C++ Compiler for applications running on Intel 64, Version 12.0.0.06
3 Build 20100721
--------------------------------------------------------------------------------
But Intel->"Product Updates" is actually telling me, that everything is up to date. Where can I get that missing update?
Thanks,
David Ecker
Intel Parallel Studio 2011
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Intel Parallel Amplifier 2011 Update 1 (build 127928)
Intel Parallel Inspector 2011 Update 1 (build 128785)
Intel Parallel Advisor 2011 Update 1 (build 124239)
Intel Parallel Composer 2011 Update 2 (package 114)
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
But the error still exists:
1>------ Build started: Project: FindError, Configuration: Debug Win32 ------
1> FindError.cpp
1>C:\Users\david\Documents\Visual Studio 2010\Projects\FindErrir\FindErrir\FindError.cpp(14,1): error : 0_15104
1>
1> compilation aborted for FindError.cpp (code 4)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Thanks,
David Ecker
Hi David,
Thanks, I can reproduce the problem now with update 2. I'll check with the upcoming release and see if the issue is fixed. If not, I'll file an issue with the developers and will keep you updated, appreicate much.
-regards,
Kittur
Well,the problem is actually with our error checking. The test case is not legal; C++ exception handling and Microsoft structured exception handling cannot be mixed in the same routine.
Compiling with the Microsoft compiler produces this error:
test.cpp(18) : error C2712: Cannot use __try in functions that require object unwinding
Ifyou needto generate code out of this, you'll need to disable C++ EH by not passing the -EHsc flag.
If you can attach a test case that MS can compile and icl cannot then that would definitely be an issue. For now, the developers nevertheless will fix the code to fix the error checking, just FYI. Hope that helps.
-regards,
Kittur