Syntax error for ICC13, not for MSVC?

Syntax error for ICC13, not for MSVC?

Alex K.'s picture

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.

AttachmentSize
Download files.zip95.05 KB
5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

>>...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.

Alex K.'s picture

Quote:

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.

Casey's picture

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

>>...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.

Login to leave a comment.