It looks like the gcc output contains UTF-8 smart quotes, and your terminal is not configured to display UTF-8. A simple workaround is to use locale , which does not support smart quotes inside Emacs, which forces gcc return to ASCII quotes with plain jane; a more complicated solution would be to set the terminal mode in the Ansi-Term buffer to display them correctly.
source share