Gcc Compiler Error Message Format
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads gcc error message format with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Stlfilt
Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: gcc options Sign up Is there any way to get readable gcc error and warning output at the command line? up vote 20 down vote favorite 7 For some long errors, the gcc output is dense and has lots of line-wrapping etc. Especially when errors are subtle, it can take me 10-30 seconds of squinting to parse it with my eyes. I've taken to pasting this in an open code-editor window to get some basic syntax highlighting and enable reformatting with regex's. Has anyone invented a more automated method? c++ c gcc gcc-warning share|improve this question asked Mar 17 '09 at 23:27 mikeh 1 I just make the window very wide... –i_am_jorf Mar 17 '09 at 23:33 And the font very small ;) –Anonymous Mar 17 '09 at 23:35 1 and then stop using gcc. :D –Robert P Mar 17 '09 at 23:44 2 Clarification: I love intel's c++ compiler. The messages are clean, short, and pointed. Back when I still had a license, I'd test my compiles in intel's compiler before I built with GCC just to find the big problems. –Robert P Mar 17 '09 at 23:45 @Robert I'm intrigued, hope I get a chance to try that sometime. Not appropriate on the current project unfortunately... –mikeh Mar 18 '09 at 4:28 | show 1 more comment 8 Answers 8 active oldest votes up vote 14 down vote I've found colorgcc to be invaluable. By introducing coloring, it becomes much easier to mentally parse the text of gcc error messages, especially when templates are involved. share|improve this answer answered Mar 17 '09 at 23:43 Mr Fooz 39.8k35083 1 Hey, I posted that with a temp account and now I can't follow up with it, but I wanted to say thanks for this -- that is an awesome utility and just the sort I was looking for. –mikeh Mar 18 '09 at 4:24 Glad to be of service. –Mr Fooz Mar 18 '09 at 11:39 I like this, but I would prefer message simplification like gccfilter and stlfilt does, although stlfilt doesn't do coloring –Dolan Antenucci Oct 5 '12 at 2:34 1 colorgcc is hackable. You might try modifyi
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Different template error format in GCC? up vote 0 down vote favorite GCC has a very verbose format for certain template error messages: ... some_class [with int A = 1, int B = 2, int C = http://stackoverflow.com/questions/656420/is-there-any-way-to-get-readable-gcc-error-and-warning-output-at-the-command-lin 3] Any chance to make it show something like: ... some_class<1,2,3> c++ templates gcc share|improve this question asked Aug 23 '10 at 10:37 uj2 730821 not only gcc... –Anders K. Aug 23 '10 at 10:53 add a comment| 3 Answers 3 active oldest votes up vote 3 down vote accepted You will lose track from what template the specialization comes from: template
last months will be deleted periodically to fight SPAM! Home Help Search Login Register http://forums.codeblocks.org/index.php?topic=17834.0 Wiki Code::Blocks » User forums » General (but related to Code::Blocks) » How to change the gcc build error messages format in codeblocks? « previous next https://www.eclipse.org/forums/index.php/t/46465/ » Send this topic Print Pages: [1] Go Down Author Topic: How to change the gcc build error messages format in codeblocks? (Read 4659 times) Master error message Multiple posting newcomer Posts: 53 How to change the gcc build error messages format in codeblocks? « on: April 20, 2013, 12:34:13 pm » 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 : error message format gcc now has a better Diagnostics , looking at the examples provided such as :Code: [Select]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 : Code: [Select]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 : Code: [Select]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,
Things LocationTech Long-Term Support PolarSys Science OpenMDM More Community Marketplace Events Planet Eclipse Newsletter Videos Participate Report a Bug Forums Mailing Lists Wiki IRC How to Contribute Working Groups Automotive Internet of Things LocationTech Long-Term Support PolarSys Science OpenMDM Toggle navigation Home Projects Forums Eclipse Community Forums Forum Search: Search Help Register Login Home Home» Language IDEs» C / C++ IDE (CDT)» Hacking error messages Show: Today's Messages :: Show Polls :: Message Navigator Hacking error messages [message #150073] Wed, 27 July 2005 00:24 Patrick TurleyMessages: 43Registered: July 2009 Member We're using Green Hills compilers to compile C code. Eclipse doesn't understand Green Hills error messages, so I have to read the console output to find my errors and I can't just click on a "Problem" entry to jump to the error. I *could* write an error parser for the Green Hills compiler, but that would require me getting elbow-deep in Eclipse development and I'm a total n00b (not a Java n00b, just an Eclipse n00b). Or, I could write a filter using sed scripts or awk or something to put Green Hills error messages in a format that Eclipse knows about... Or so I thought... I tried writing a test program and looking at gcc's output. I'm pretty sure this is a hopeless idea. Does anyone have anything heartening to tell me? Or is this line of inquiry as doomed as it appears to be? Has anyone actually written a Green Hills error parser that is (so far) invisible to Google? Report message to a moderator Re: Hacking error messages [message #150180 is a reply to message #150073] Wed, 27 July 2005 21:33 Patrick TurleyMessages: 43Registered: July 2009 Member This is a multi-part message in MIME format. --------------050009000303020407060301 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Actually - I was wrong. It's not too bad. For those of you who happen to use Green Hills and Eclipse, the script is attached. My understanding is that Green Hills is a