Re: Reverse order diagnostics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 4 Apr 2019 at 19:52, LRN wrote:
>
> Is there a way to make gcc output errors and warnings in reverse order, so that
> the first error is printed last? I know that i can buffer gcc output in a
> separate program that then reverses it, but:
> 1) It would reverse the whole thing (meaning that multiline messages will also
> have to be read bottom-to-top)
> 2) This might not interact with -fdiagnostics-color correctly (especially if
> colored output is not achieved by inserting escape codes).

It is achieved using escape codes.

I often use a shell function that does this:

gcc ... -fdiagnostics-color | less --quit-if-one-screen --RAW-CONTROL-CHARS

This way the first error doesn't scroll off the screen.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux