5.4. C++ Compiler Error Messages. Altium TriCore
Reklamë
Reklamë
Using the C++ Compiler
First the C++ compiler looks for the file stdio.h
in the directory myinclude
relative to the current directory. If it was not found, the C++ compiler searches in the environment variable
CPTCINC
and then in the default include
directory.
The C++ compiler now looks for the file myinc.h
, in the directory where test.cc
is located. If the file is not there the C++ compiler searches in the directory myinclude
. If it was still not found, the C++ compiler searches in the environment variable
CPTCINC
and then in the default include.cpp
and include
directories.
5.4. C++ Compiler Error Messages
The C++ compiler reports the following types of error messages in the Problems view of Eclipse.
F ( Fatal errors)
Catastrophic errors, also called 'fatal errors', indicate problems of such severity that the compilation cannot continue. For example: command-line errors, internal errors, and missing include files. If multiple source files are being compiled, any source files after the current one will not be compiled.
E (Errors)
Errors indicate violations of the syntax or semantic rules of the C++ language. Compilation continues, but object code is not generated.
W (Warnings)
Warnings indicate something valid but questionable. Compilation continues and object code is generated
(if no errors are detected). You can control warnings in the C/C++ Build » Settings » Tool Settings »
C/C++ Compiler » Diagnostics page of the Project » Properties menu (
R (Remarks)
Remarks indicate something that is valid and probably intended, but which a careful programmer may want to check. These diagnostics are not issued by default. Compilation continues and object code is generated (if no errors are detected). To enable remarks, enable the option Issue remarks on C++ code in the C/C++ Build » Settings » Tool Settings » C/C++ Compiler » Diagnostics page of the Project
» Properties menu (
).
S (Internal errors)
Internal compiler errors are caused by failed internal consistency checks and should never occur. However, if such a 'SYSTEM' error appears, please report the occurrence to Altium. Please include a small C++ program causing the error.
Message format
By default, diagnostics are written in a form like the following: cptc E0020: ["test.cc" 3] identifier "name" is undefined
199
TASKING VX-toolset for TriCore User Guide
With the command line option --error-file=file you can redirect messages to a file instead of stderr
.
Note that the message identifies the file and line involved. Long messages are wrapped to additional lines when necessary.
With the option C/C++ Build » Settings » Tool Settings » Global Options » Treat warnings as errors
( option --warnings-as-errors ) you can change the severity of warning messages to errors.
For some messages, a list of entities is useful; they are listed following the initial error message: cptc E0308: ["test.cc" 4] more than one instance of overloaded
function "f" matches the argument list:
function "f(int)"
function "f(float)"
argument types are: (double)
In some cases, some additional context information is provided; specifically, such context information is useful when the C++ compiler issues a diagnostic while doing a template instantiation or while generating a constructor, destructor, or assignment operator function. For example: cptc E0265: ["test.cc" 7] "A::A()" is inaccessible
detected during implicit generation of "B::B()" at line 7
Without the context information, it is very hard to figure out what the error refers to.
Termination Messages
The C++ compiler writes sign-off messages to stderr
(the Problems view in Eclipse) if errors are detected.
For example, one of the following forms of message
n errors detected in the compilation of "file".
1 catastrophic error detected in the compilation of "file".
n errors and 1 catastrophic error detected in the compilation of "file".
is written to indicate the detection of errors in the compilation. No message is written if no errors were detected. The following message
Error limit reached.
then terminated. The message
Compilation terminated.
is written at the end of a compilation that was prematurely terminated because of a catastrophic error.
The message
Compilation aborted
200
Using the C++ Compiler
is written at the end of a compilation that was prematurely terminated because of an internal error. Such an error indicates an internal problem in the compiler. If such an internal error appears, please report the occurrence to Altium. Please include a small C++ program causing the error.
201
TASKING VX-toolset for TriCore User Guide
202
Shkarko
Reklamë