Compiler Error on identifier "__builtin_addressof"
Hi,
I am trying to run a unit test using Parasoft 10.3 plugin for Eclipse Neon and stumbling upon a compiler error. The project compiles successfully when just building the project through Eclipse so there are no compile errors. But, when I try to run a unit test in this project then it fails to compile with a compiler error as follows:
...
[C++ test] [TestSuite_ClassA_cpp.cpp] "C:/compiler/.../arm/sysroot/usr/include/c++/x.x.x/bits/move.h, line 48: error:
identifier "__builtin_addressof" is undefined
{ return __builtin_addressof(__r); }
...
Since this compile error does not occur during a normal project build in Eclipse, it must be related to Parasoft build as it only occurs during a unit test build.
Please advice on how to resolve this.
Thanks,
-Saurav
Comments
-
Hi,
The error you are facing is an effect of source code instrumentation. The best way to diagnose it is by analyzing the preprocessed file, before instrumentation. Can you please preprocess the source file for which you see the error and report the problem to the support team together with the preprocessed file?
0 -
How do I preprocess a file?
Do I need to customize a unit test configuration to contain only the preprocess step and use that to create a preprocessed file?0 -
Please go to Parasoft Menu -> preferences -> Technical Support and enable "Preprocessed source files" and "Enable auto-creation of support archives". Note the path in "Archives location" field. Next run the unit testing configuration, upon failure C++test should create a tech support archive in the "Archives location". The archive should contain the preprocessed file, you can contact Parasoft support team and attach this archive or extracted preprocessed file only.
0 -
I cannot provide the archive (or any other file from the working PC) because it is classified. What other information can I provide to help with this case?
0 -
Can you share the information about compiler? What is the version number? Is this commercial or your own build of gcc? Also, is your target 32 or 64 bit?
0 -
In addition to my previous comment, can you please provide information what is the compiler family selected in the Project Properties->Parasoft->C++test->Build Settings?
0