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 (http://gcc.gnu.org/wiki/ClangDiagnosticsComparison#fnref-c80f7dfc6950973199cc4f44ec4ae68de8e7cf2d) : gcc now has a better Diagnostics , looking at the examples provided such as :
void foo(char **p, char **q)
{
(p - q)();
p();
}
and trying to get the same thing in CB just fails , look at the error provided at gcc comparison page :
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)
^
and look at the error log generated inside CB :
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) ===|
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?