How to add newlines/borders between errors and warnings in gcc/clang

Viewed 39

I understand that this may be a noob question, but often I have trouble figuring out where the error/warning starts when looking at build output, especially if it is from CI with CMake output sprinkled in or some remote machine(so no nice IDE highlighting).

Is there a way to tell gcc/clang to insert newlines or ------------ after and before every error warning? This is especially imporant for deeply nested error(e.g. templates that die inside STL implementation).

1 Answers

Looking at gcc docs, there are some formatting options that you can try, for example:

-fdiagnostics-color=always

or by altering the minimum margin between errors:

-fdiagnostics-minimum-margin-width=width

Refer to that page for an indepth explanations.

Related