From c7f9c0b9835fc77208bddffec0ba71d33fb425fa Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 18 Apr 2009 18:36:28 +0100 Subject: re PR preprocessor/39646 (__FILE__ breaks for empty file name) libcpp: PR preprocessor/39646 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM. * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM. * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in place of LC_RENAME. gcc/testsuite: * gcc.dg/cpp/line8.c: New test. From-SVN: r146319 --- libcpp/include/line-map.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libcpp/include/line-map.h') diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index 501a193..56ab79a 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -31,8 +31,9 @@ along with this program; see the file COPYING3. If not see when including a new file, e.g. a #include directive in C. LC_LEAVE is when reaching a file's end. LC_RENAME is when a file name or line number changes for neither of the above reasons - (e.g. a #line directive in C). */ -enum lc_reason {LC_ENTER = 0, LC_LEAVE, LC_RENAME}; + (e.g. a #line directive in C); LC_RENAME_VERBATIM is like LC_RENAME + but a filename of "" is not specially interpreted as standard input. */ +enum lc_reason {LC_ENTER = 0, LC_LEAVE, LC_RENAME, LC_RENAME_VERBATIM}; /* The type of line numbers. */ typedef unsigned int linenum_type; -- cgit v1.1