Hi David, I just wanted to say that this does not work right on ubuntu 14.04 at least:
g++ -Wshadow=local -Wno-shadow=compatible-local -S Wshadow-1.c Wshadow-1.c: In function 'void foo(int*, int*)': Wshadow-1.c:8:9: warning: declaration of 'int d' shadows a parameter []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wshadow=local-Wshadow=local]8;;] 8 | int d = 0; /* { dg-warning "Wshadow=local" } */ | ^ Wshadow-1.c:4:23: note: shadowed declaration is here 4 | void foo(int *c, int *d) /* { dg-bogus "Wshadow" } */ | ~~~~~^ Wshadow-1.c: In function 'void bar(int*, int*)': Wshadow-1.c:15:15: warning: declaration of 'c' shadows a global declaration []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wshadow-Wshadow]8;;] 15 | void bar(int *c, int *d) /* { dg-warning "Wshadow" } */ | ~~~~~^ Wshadow-1.c:3:5: note: shadowed declaration is here 3 | int c; | ^ Wshadow-1.c:19:9: warning: declaration of 'int d' shadows a parameter []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wshadow-Wshadow]8;;] 19 | int d = 0; /* { dg-warning "Wshadow" } */ | ^ Wshadow-1.c:15:23: note: shadowed declaration is here 15 | void bar(int *c, int *d) /* { dg-warning "Wshadow" } */ | ~~~~~^ Wshadow-1.c:22:10: warning: declaration of 'e' shadows a previous local []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wshadow-Wshadow]8;;] 22 | int *e = 0; /* { dg-warning "Wshadow" } */ | ^ Wshadow-1.c:17:8: note: shadowed declaration is here 17 | int *e = d; | ^ Coloring works, even the hyperlinks seem to work, when clicked at, although they jump just to the top of the page, and one has to scroll down to the warning manually. But the warning name is very hard to spot in all that glibberish long text :-( Do you see a way to find out if the escape sequences are supported, or how to disable this function per configure option? Thanks Bernd.