Trying to compile this simple program: --- 8< --- trigraph-error.c --- #include <stdio.h> int main (int argc, char **argv) { puts ("Error (???) FIXME"); return 1; } --- >8 ------------------------ with "gcc -Wall" results in this warning: trigraph-error.c:5:24: warning: trigraph ??) ignored I don't think that it's correct for gcc to try to interpret trigraphs inside string constants.
What's so special about trigraphs in string constants? The warning you see is not about interpreting the trigraph, it is a portability warning (the program will give different result when compiled with -std=c89 (or -ansi or -std=c99) than without these options. With e.g. C99 you get a different warning: gcc -O2 -std=c99 -o o o.c -Wall o.c:5:18: warning: trigraph ??) converted to ] E.g. ISO C99 standard explicitely lists as an example that printf("Eh???/n"); does the same as printf("Eh?\n"); The only place where -Wtrigraphs does not warn in is in comments.