https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78787
Bug ID: 78787 Summary: O Color, Where Art Thou? (with -flto) Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- Compiling the program below in an xterm window produces two warnings. The first one (-Wunused-parameter) is colorized while the second one (-Wstringop-overflow=) is not. I don't know if that's a driver problem or an lto problem but having become accustomed to the colorized diagnostics the LTO output decidedly looks lacking in ... well, color. Explicitly specifying -fdiagnostics-color=always makes both warnings appear in color. $ cat z.c && /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -O2 -Wall -Wextra -flto z.c char d[1]; int main (int argc, char *argv[]) { __builtin_strcpy (d, argc < 3 ? "123" : "456789"); } z.c: In function ‘main’: z.c:3:27: warning: unused parameter ‘argv’ [-Wunused-parameter] int main (int argc, char *argv[]) ^~~~ z.c: In function ‘main’: z.c:5:3: warning: ‘__builtin_strcpy’ writing 4 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=] __builtin_strcpy (d, argc < 3 ? "123" : "456789"); ^