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.
Below is the list of the error and warning messages and their explanations.
- 0: Configuration parameter X has illegal value Y
- The parameter X is either set in a configuration file
(ctc.ini), or by the command-line option
-C X=Y. With option-Vfor ctc, you can show the configuration files used to correct the erroneous definition. - 1: Bad configuration format "X" in file Y at line N
- X 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 X
- The file X is either not a symbol file from Testwell CTC++, or was created with a different major version. Delete the symbolfile and perform an instrumented build from scratch.
- 3: Bad or misplaced CTC++ pragma X in file Y at line Z
- This is a warning. There has been #pragma CTC X, and the X is unknown to Testwell CTC++ or is in an unacceptable place.
- 4: Environment variable X has illegal value Y
- The value of the specified environment variable is not accepted by Testwell CTC++.
- 5: Cannot close file X: Y
- Closing of the file X failed for reason Y.
- 7: Cannot execute C or C++ preprocessor or preprocessing failed: Y
- The configuration parameter PREPROC_C or PREPROC_CXX was used as a model in constructing the command for C/C++ preprocessing the source file to be instrumented. ctc failed to invoke that command successfully. Note that even if ctc had succeeded in the command invocation, the command execution itself may have been failed. System’s return code is Y.
- 8: Cannot execute C or C++ compiler or compilation failed: Y
- For some reason the invoking of the command for compiling has failed. Note that even if ctc had succeeded in the command invocation, the command execution itself may have been failed. System’s return code is Y.
- 9: Cannot create file X: Y
- Failed to create the file X for reason Y.
- 10: Identifier begins with 'ctc_' in file X at line Y
- This is a warning. In parsing the source file to be instrumented ctc has detected an identifier starting with "ctc_". Because Testwell CTC++ itself uses, for example inserts into the instrumented file, such identifiers, this is a warning that your use of such identifiers may conflict with Testwell CTC++'s use.
- 11: Misplaced string X in file Y at line Z
- 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: Y
- Operating system service call for resolving what is the current working directory had failed for reason Y.
- 13: Erroneous command line, X Y
- The command-line options and/or parameters given to ctc are erroneous.
- 14: Unknown error
- Some ctc internal sanity-checks. No detailed reason for the error message is available.
- 15: Licence problem: X
- There is a problem with the Testwell CTC++ license. The additional information X tells more of the nature of the problem. For example X might be "the license has expired", "wrong TOOL version", "cannot check out FLEXlm license", etc.
- 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
- Failed to create the lock file X.lock for the symbolfile X for reason Y.
- 18: Cannot remove lock file X.lock: Y
- Failed to delete the lock file X.lock of the symbolfile X for reason Y.
- 19: Mismatched CTC ENDSKIP in file X at line Y
- In source file to be instrumented there was a "#pragma CTC ENDSKIP" without a prior matching "#pragma CTC SKIP".
- 20: Missing definition X in configuration file
- Configuration parameter X is missing.
- 22: Cannot open file X: Y
- Opening of the specified file failed for reason Y.
- 23: Out of memory
- Some ctc internal operation requiring free heap space had failed.
- 24: Cannot read file X: Y
- Reading of the specified file failed for reason Y.
- 25: Pragma X encountered in function body (file X:Y)
- 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. Additionally, use of these inside a function causes that statement coverage of a function will not be reported (0/0 is emulated).
- 26: Syntax error in file X at line Y
- 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 X at line Y
- The source file X was instrumented for multicondition coverage. At line Y 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
- You hardly have so big files where this error message would come, because the limit for various counters is INT_MAX.
- 30: Cannot execute the user-specified command or the command failed: "X"
- Configuration parameter RUN_BEFORE_ALL, RUN_AFTER_CPP, RUN_AFTER_INSTR or RUN_AFTER_COMP was defined, the command specified by it was invoked but it returned with a non-zero code. The "X" is the invoked command and the used arguments.
- 32: Abnormal use of case/default, not instrumented (file X:Y)
- This is an info-category warning (tool limitation). A
case i:ordefault:label was encountered, but it was not immediately in the compound statement of theswitchbody. For technical reasons such oddly placed case labels are not instrumented. - 33: Capacity restriction, something too big for CTC++ (file X:Y)
- There is some Testwell CTC++ internal capacity problem arising from the specified file and line.
- 34: Cannot write file X: Y
- Writing to the specified file failed for reason Y.
- 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 X at line Y
- This is an info-category warning (tool limitation). File X was instrumented for multicondition coverage and the ternary decision contained && or || operators. For technical reasons the decision could not be instrumented for multicondition coverage. It is anyway instrumented for decision coverage.
- 37: Decision not instrumented (because of 'const') in file X at line Y
- This is an info-category warning (tool limitation). A
constvariable declaration was initialized by an expression containing a ternary decision. For technical reasons the decision is not instrumented. (This is a precaution if the variable would be later used in array size declaration, which code would not compile)