go to start Reading Compiler Warnings And Errors
|home |print view |recent changes |changed September 1, 2015 |
exact
|You are 54.81.139.56 <- set your identity!

Sections: How to Read Warnings and Errors | Kinds of Errors | Compiler Error http:files/compile_error.png | Compiler Warning http:files/compile_warning.png | CDT Syntax Error http:files/syntax_error.png | Codan Error http:files/codan_error.png | Codan Warning http:files/codan_warning.png | Cevelop Error http:files/cevelop_error.png | Cevelop Warning http:files/cevelop_warning.png | Cevelop Suggestion http:files/cevelop_suggestion.png |

How to Read Warnings and Errors ^

Cevelop provides ample of information about the correctness of C++ source code in the editor. For efficient use of the tools integrated into Cevelop it is very important to understand how they visualize their information. The various plug-ins display errors, warnings and suggestions in different ways. Altough, they should be very consistent regarding the problems they express, some of the might still lack of correctness or completeness. Inconsistencies usually origin from outdated context information, which we will explain below.

Kinds of Errors ^

Below you find a list of the kinds of messages Cevelop (CDT) will attach to your source code.

Compiler Error ^

When hitting the build button (small hammer). Cevelop will invoke the compiler which tries to compile your programm. There will be output on the console. There you can see which commands are executed and you will get error messages if compilation failed for any reason. Errors are highlighted red. Cevelop will also parse this output and annotate the source code with error markers at the corresponding location if possible. If you hover over the error marker you can see the message which belongs to the error.

The error markers will vanish when you build your programm again. An reappear if it is still wrong.

The compiler is always right! Well, actually it isn't. But usually you cannot do much about it if it refuses to compile your code, except for changing the code to something it is happy with.

Compiler Warning ^

While compiling you program the compiler can complain about code that contains minor problems. Warnings don't prevent the compiler from compiling your program but should be taken care of nevertheless.

A compile warning is denoted by an orange triangle. It will last until you build your project again.

CDT Syntax Error ^

CDT hosts its own parser to analyze your source code. It provides feedback if your code could not be parsed correctly due to syntax errors. Furthermore, problems when resolving includes have the sam appearance.

CDT Syntax Errors are marked with a questionmark in an orange box.

Theoretically, it might be possible that the compiler can compile your programm correctly, although CDT reports a syntax error. But in normal C++ code this hardly ever happens.

Codan Error ^

CDT furthermore provides the code analysis framework (Codan). Codan is responsilble for verifying correct semantics of your source code. It depends on CDT's parser and the integrated semantic analysis. Codan errors have a little red bug as icon.

It might be that the compiler still accepts code for which Codan reports an error. Such false positives might be caused by bugs in the implementation or the index being out of date.

Information such anlysis is based on might be outdated, usually due to performance reason. Subsequently, you might encounter Codan messages for correct code. Updating the fundamental data structure is sometimes required (context menu -> Index -> Rebuild Index).

Note: Many problems regarding the code analysis might occur when the project setup is not correct. This especially happens when renaming or copying C++ projects. So don't do this!

Codan Warning ^

Codan also reports common flaws in your code, which sould be avoided.

Codan warnings are displayed with a little yellow bug icon.

Cevelop Error ^

Built ontop of the Codan framework Cevelop provides some additional analysis.

Cevelop errors are marked with a triangle in a red dot.

In principle it has the same responsibility, but problems reported by Cevelop, usually can be corrected by a quick-fix. I.e. by clicking on the marker you get a context menu with suggestions how to resolve the problem.

Cevelop Warning ^

Cevelop warnings indicate unintended behavior. The code will compile, but you might have missed something. E.g. an unregistered CUTE test, which will not be executed as expected.

Cevelop warnings are marked with a square in a yellow dot.

Cevelop Suggestion ^

Cevelop aims at developing modern C++. It provides some hints about how to modernize your source code. For example by getting rid of macros or properly initializing variables with C++11-style initialization.

Cevelop suggestions are marked with a star in a green dot.


|home |print view |recent changes |changed September 1, 2015 |
exact
|You are 54.81.139.56 <- set your identity!

Reading Compiler Warnings And Errors
go to start