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

Syntax error for ICC13, not for MSVC?

Alex_K_6
Beginner
307 Views

Another issue I've ran into when trying to compile Mozilla:

c:/mozilla-release/js/src/ion/CodeGenerator.cpp(300): error: expected a ";"

      bool accept(CodeGenerator *codegen) MOZ_FINAL MOZ_OVERRIDE {

                                          ^



c:/mozilla-release/js/src/ion/CodeGenerator.cpp(339): error: class "js::ion::OutOfLineTestObject" has no member "setInputAndTargets"

      ool->setInputAndTargets(objreg, ifTruthy, ifFalsy, scratch);

I've attached the compile log and all the necessary files. This occurs on ICC 13 Update 2 and 5 from what I've tested. Compiles without an issue with Visual Studio 10 and 12. I've checked for a missing ; and no other errors are present.

0 Kudos
4 Replies
SergeyKostrov
Valued Contributor II
307 Views
>>...CodeGenerator.cpp(339): error: class "js::ion::OutOfLineTestObject" has no member "setInputAndTargets" The 'has no member' means that the method "setInputAndTargets" is "if-def"ed and some macro is Not defined when Intel C++ compiler is used.
0 Kudos
Alex_K_6
Beginner
307 Views

Sergey Kostrov wrote:

>>...CodeGenerator.cpp(339): error: class "js::ion::OutOfLineTestObject" has no member "setInputAndTargets"

The 'has no member' means that the method "setInputAndTargets" is "if-def"ed and some macro is Not defined when Intel C++ compiler is used.

But shouldn't ICC be a drop in replacement for MSVC? Also Mozilla doesn't differentiate between MSVC and ICC and treats them the same.

0 Kudos
Casey
Beginner
307 Views

A drop in replacement doesn't mean its going to work out of the box for projects which make use of ifdefs that depend on compiler specifc defines.  Check this out for some info on getting mozilla to build with icpc on windows with msvc: https://code.google.com/p/pcxfirefox/wiki/MozillaBuiltICC

0 Kudos
SergeyKostrov
Valued Contributor II
307 Views
>>...But shouldn't ICC be a drop in replacement for MSVC? Intel C++ compiler is highly compatible with Microsoft C++ compiler. The error you've described happens when there is implementation of some method in a class but there is No a declaration for that method in the class. Try to create a simple test case and you will easily reproduce it and you will understand exactly why it happens. In overall, you need to verify if that method is wrapped by some macro.
0 Kudos
Reply