Re: Reverse order diagnostics

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

 



On 05.04.2019 13:19, Jonathan Wakely wrote:
> 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.

Ah, my bad. For a second i thought that there's pre-10 Windows support in gcc.
Obviously, that's not the case.

> 
> 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.
> 

Wait, what? You build software by running gcc manually, for each file in your
software project? You're not even using makefiles?

Attachment: signature.asc
Description: OpenPGP digital signature


[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