They’re not difficult to implement. It’s a sed pass running before any preprocessor or even lexer, which is the horrifying thing. They replace characters in source code, they’re not normal tokens like digraphs. And so e.g. the following program won’t print what a mere mortal would expect:
#include <stdio.h>
int main() {
puts(“What??(Really.)”);
}
Try running that. Only change the quote marks to the ones on a normal keyboard (I’m on my phone.)Edit: Oh, and remember to compile with -std=c11 e.g. gnu11 has trigraphs disabled by default.