Error Messages of ctc

Error messages are written to stderr. When ctc is aborted by an error, exit code 1 is set instead of 0.

Writing of warning messages is controlled by WARNIG_LEVEL configuration setting:

  • none: No warnings are written. (option -no-warnings enforces this, too)
  • warn: Normal warnings are written.
  • info: Normal warnings and also warnings that are rated as "information" are written.

With the option –v (verbose) used and –no-warnings option not used, all warnings are written regardless of the WARNING_LEVEL value.

Adding the option –v to the ctc call allows to further analyze the situation.

Below is the list of the error and warning messages and their explanations.

0: Configuration parameter PARAM has illegal value VALUE
The parameter PARAM is either set in a configuration file (ctc.ini), or by the command-line option -C PARAM=VALUE. With option -V for ctc, you can show the configuration files used to correct the erroneous definition.
1: Bad configuration format PARAM in file filename at line N
PARAM is not a valid configuration parameter. If no file is specified, it is probably set for the command-line call directly.
2: Bad identification stamp in symbol file filename
The file filename is either not a symbol file from Testwell CTC++, or was created with a different major version. In the latter case, perform an instrumented build from scratch.
3: Bad or misplaced CTC++ pragma pragma in file filename at line N
This is a warning. A pragma starting with "CTC" has been detected, but it is unknown or misplaced for use with Testwell CTC++.
4: Environment variable ENV has illegal value VALUE
The value of the specified environment variable is not accepted by Testwell CTC++.
5: Cannot close file filename: reason
Closing of the file filename failed.
7: Cannot execute C or C++ preprocessor or preprocessing failed: return-code
The configuration parameter PREPROC_C or PREPROC_CXX is used to construct the command for C/C++ preprocessing. ctc failed to invoke that command successfully, or the command execution failed. System’s return code is displayed.
8: Cannot execute C or C++ compiler or compilation failed: return-code
The invoking of the compilation command or the command execution failed. System’s return code is displayed.
9: Cannot create file filename: reason
Failed to create the file filename.
10: Identifier begins with 'ctc_' in file filename at line N
This is a warning. In parsing the source file to be instrumented ctc has detected an identifier starting with "ctc_". Because Testwell CTC++ uses such identifiers for instrumentation, this is a warning that your use of such identifiers may be in conflict with Testwell CTC++'s use.
11: Misplaced string CTCSTRING in file filename at line N
This is a warning. In parsing the source file to be instrumented, ctc has detected the string “CTC SKIP” or “CTC ENDSKIP” that is inside a function body but is not used as a statement. These strings are not accepted as alternatives to #pragma CTC SKIP/ENDSKIP unless they are used as a statement.
12: Cannot get current directory: reason
Operating system service call for resolving what is the current working directory had failed.
13: Erroneous command line, description
The command-line options or their parameters given to ctc are erroneous. If description is "unknown command" followed your compiler's name, it is most likely that this compiler is not specified in any of the given configuration files (e.g. ctc.ini) and is therefore unknown to ctc.
14: Unknown error
Some ctc internal sanity-checks. No detailed reason for the error message is available.
15: Licence problem: description
No license could be checked out for this ctc run. The description from Flexera's licensing software gives more details about the problem. You can also check with ctc -V which licenses are generally available.
16: Cannot execute linker or linking failed
For some reason the invoking of the command for linking has failed. Note that even if ctc had succeeded in the command invocation, the command execution itself may have been failed.
17: Cannot create lock file X.lock: Y
(deprecated) Failed to create the lock file X.lock for the symbol file X for reason Y.
18: Cannot remove lock file X.lock: Y
(deprecated) Failed to delete the lock file X.lock of the symbol file X for reason Y.
19: Mismatched CTC ENDSKIP in file filename at line N
In source file to be instrumented there was a "#pragma CTC ENDSKIP" without a prior matching "#pragma CTC SKIP".
20: Missing definition PARAM in configuration file
Configuration parameter PARAM is missing. You can check with option -V which configuration files are used. As all mandatory parameters are set in the configuration files delivered with Testwell CTC++, a whole file might have been deleted. Check for example if there is still a ctc.ini in CTCHOME.
22: Cannot open file filename: reason
Opening of the specified file failed.
23: Out of memory
Some ctc internal operation requiring free heap space had failed.
24: Cannot read file filename: reason
Reading of the specified file failed.
25: Pragma CTCPRAGMA encountered in function body (file filename:N)
This is a warning. "#pragma CTC SKIP" or "#pragma CTC ENDSKIP" was in a function body which is not recommended, because it may result in non-compilable code, if not used correctly.
26: Syntax error in file filename at line N
Testwell CTC++ assumes the source files to be instrumented to be syntactically correct C or C++ and does not actually make syntax checking. However, when parsing some portions of the source files, some minimal syntax checking is done, and if problems are detected, they are reported with this error message.
27: Cannot create temporary file
ctc could not create a temporary file.
28: Too complex code, reduced to decision coverage in file filename at line N
The source file filename was instrumented for multicondition coverage. At line N there has been a decision with many && or || operators leading to more than 500 possible evaluation alternatives (TRUE - FALSE - combinations). The decision is instrumented for decision coverage only.
29: Counter limit reached X
The source file needs too many counters.
30: Cannot execute the user-specified command or the command failed: command
Configuration parameter RUN_BEFORE_ALL, RUN_AFTER_CPP, RUN_AFTER_INSTR or RUN_AFTER_COMP are defined, the command specified by it was invoked but it returned with a non-zero code.
32: Abnormal use of case/default, not instrumented (file filename:N)
This is an info-category warning. A case i: or default: label was encountered, but it was not immediately in the compound statement of the switch body. These kind of case labels are not instrumented.
33: Capacity restriction, something too big for CTC++ (file filename:N)
There is some Testwell CTC++ internal capacity problem arising from the specified file and line.
34: Cannot write file filename: reason
Writing to the specified file failed.
35: Original compile/link command failed (-2comp)
This is a warning. There has been an explicit -2comp option or the OPT_DO_2COMP configuration setting has provoked execution of the original compile or link command, but it had failed. It should not happen, but in certain very rare situations it can happen from a Testwell CTC++ reason. In spite of this, the actual instrumentation is attempted to be done to its completion.
36: Ternary-?: instrumented for decision coverage only in file filename at line N
This is an info-category warning (tool limitation). The file is instrumented for multicondition coverage and the ternary decision contains && or || operators. It will be instrumented for decision coverage only.
37: Decision not instrumented (because of 'const') in file filename at line N
This is an info-category warning. A const variable declaration with a multicondition or a ternary-? operator on the right hand side must not be instrumented in C. For C++, the configuration parameter CONST_INSTR can be set to ON, if the const property for this kind of variables is not needed at compilation time.