From 46ce03de3afe6dcd7b23572ada199c28ffc10e70 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 19 Nov 2015 09:27:12 +0100 Subject: re PR preprocessor/60736 (Crash in preprocessor including stdc-predef.h when it does not exist on glibc-based systems) PR preprocessor/60736 * include/cpplib.h (cpp_errno_filename): New prototype. * errors.c (cpp_errno): Don't handle msgid "" specially, use _(msgid) instead of msgid as argument to cpp_error. (cpp_errno_filename): New function. * files.c (read_file_guts): Use cpp_errno_filename instead of cpp_errno. (open_file_failed): Likewise. Use file->name if file->path is NULL in diagnostics. From-SVN: r230591 --- libcpp/include/cpplib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libcpp/include/cpplib.h') diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index f5c2a21..3cb8cce 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -986,6 +986,9 @@ extern bool cpp_warning_syshdr (cpp_reader *, int, const char *msgid, ...) /* Output a diagnostic with "MSGID: " preceding the error string of errno. No location is printed. */ extern bool cpp_errno (cpp_reader *, int, const char *msgid); +/* Similarly, but with "FILENAME: " instead of "MSGID: ", where + the filename is not localized. */ +extern bool cpp_errno_filename (cpp_reader *, int, const char *filename); /* Same as cpp_error, except additionally specifies a position as a (translation unit) physical line and physical column. If the line is -- cgit v1.1