re PR preprocessor/27777 (Bad diagnostic emission when #error contains a trigraph)
gcc/testsuite PR preprocessor/27777: * gcc.dg/cpp/pr27777.c: New file. libcpp PR preprocessor/27777: * lex.c (cpp_output_line_to_string): New function. * internal.h (_cpp_begin_message): Don't declare. * errors.c (_cpp_begin_message): Now static. * include/cpplib.h (cpp_output_line_to_string): Declare. * directives.c (do_diagnostic): Rewrote. Use cpp_output_line_to_string. Don't use _cpp_begin_message. From-SVN: r135740
This commit is contained in:
parent
0fda18dd70
commit
5d6342ebc2
8 changed files with 86 additions and 14 deletions
|
@ -844,6 +844,8 @@ extern void cpp_error_with_line (cpp_reader *, int, source_location, unsigned,
|
|||
/* In lex.c */
|
||||
extern int cpp_ideq (const cpp_token *, const char *);
|
||||
extern void cpp_output_line (cpp_reader *, FILE *);
|
||||
extern unsigned char *cpp_output_line_to_string (cpp_reader *,
|
||||
const unsigned char *);
|
||||
extern void cpp_output_token (const cpp_token *, FILE *);
|
||||
extern const char *cpp_type2name (enum cpp_ttype);
|
||||
/* Returns the value of an escape sequence, truncated to the correct
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue