Reverse order diagnostics
LRN
lrn1986@gmail.com
Sun Apr 7 18:47:00 GMT 2019
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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20190407/c3d4bdc7/attachment.sig>
More information about the Gcc-help
mailing list