User forums > General (but related to Code::Blocks)
How to change the gcc build error messages format in codeblocks?
(1/1)
Master:
Hello every one,
The subject is vague i know it , i couldn't just convey the meaning any better so i explain what i mean .
according to http://gcc.gnu.org/wiki/ClangDiagnosticsComparison#fnref-c80f7dfc6950973199cc4f44ec4ae68de8e7cf2d : gcc now has a better Diagnostics , looking at the examples provided such as :
--- Code: ---void foo(char **p, char **q)
{
(p - q)();
p();
}
--- End code ---
and trying to get the same thing in CB just fails , look at the error provided at gcc comparison page :
--- Code: ---t.c:3:10: error: called object is not a function or function pointer
(p - q)();
^
t.c:4:4: error: called object ‘p’ is not a function or function pointer
p();
^
t.c:1:17: note: declared here
void foo(char **p, char **q)
^
--- End code ---
and look at the error log generated inside CB :
--- Code: ---C:\Users\Master\Documents\CodeBlocks\Test\main.cpp||In function 'void foo(char**, char**)':|
C:\Users\Master\Documents\CodeBlocks\Test\main.cpp|14|error: expression cannot be used as a function|
C:\Users\Master\Documents\CodeBlocks\Test\main.cpp|15|error: 'p' cannot be used as a function|
||=== Build finished: 2 errors, 0 warnings (0 minutes, 11 seconds) ===|
--- End code ---
I am using the gcc 4.8, How can i achieve the same behavior in CB? is there any kind of settings i am missing here?
Jenna:
If these errors are thrown by gcc, you should see them in the "Build log"-tab, it shows the raw output of gcc.
However, you will not be able to click them to jump to the error-line.
That can only be done from inside the the "Build messages"-tab.
The output is parsed by regexes. You can change them in "Settinngs -> Compiler -> Global compiler settings -> [the compiler you use] -> Other settings -> Advanced options -> Output parsing".
Master:
--- Quote from: jens on April 20, 2013, 12:49:48 pm ---If these errors are thrown by gcc, you should see them in the "Build log"-tab, it shows the raw output of gcc.
However, you will not be able to click them to jump to the error-line.
That can only be done from inside the the "Build messages"-tab.
The output is parsed by regexes. You can change them in "Settinngs -> Compiler -> Global compiler settings -> [the compiler you use] -> Other settings -> Advanced options -> Output parsing".
--- End quote ---
Thanks alot got it ;)
Navigation
[0] Message Index
Go to full version