diff options
Diffstat (limited to 'gcc/c-family/c-lex.c')
-rw-r--r-- | gcc/c-family/c-lex.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c index 4b04e71e83d..2651331e683 100644 --- a/gcc/c-family/c-lex.c +++ b/gcc/c-family/c-lex.c @@ -616,7 +616,11 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags, else if (ISGRAPH (c)) error_at (*loc, "stray %qc in program", (int) c); else - error_at (*loc, "stray %<\\%o%> in program", (int) c); + { + rich_location rich_loc (line_table, *loc); + rich_loc.set_escape_on_output (true); + error_at (&rich_loc, "stray %<\\%o%> in program", (int) c); + } } goto retry; |