aboutsummaryrefslogtreecommitdiff
path: root/libcpp/directives.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2009-04-18 18:36:28 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2009-04-18 18:36:28 +0100
commitc7f9c0b9835fc77208bddffec0ba71d33fb425fa (patch)
tree59684b555702b1b2456e3b64f86fd190e1b48332 /libcpp/directives.c
parentb8add5942c0ce71990233b594d5f0bdec31d73c8 (diff)
downloadgcc-c7f9c0b9835fc77208bddffec0ba71d33fb425fa.zip
gcc-c7f9c0b9835fc77208bddffec0ba71d33fb425fa.tar.gz
gcc-c7f9c0b9835fc77208bddffec0ba71d33fb425fa.tar.bz2
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
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r--libcpp/directives.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c
index 9cb8506..9e26732 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -924,7 +924,7 @@ do_line (cpp_reader *pfile)
}
skip_rest_of_line (pfile);
- _cpp_do_file_change (pfile, LC_RENAME, new_file, new_lineno,
+ _cpp_do_file_change (pfile, LC_RENAME_VERBATIM, new_file, new_lineno,
map_sysp);
}
@@ -940,7 +940,7 @@ do_linemarker (cpp_reader *pfile)
const char *new_file = map->to_file;
linenum_type new_lineno;
unsigned int new_sysp = map->sysp;
- enum lc_reason reason = LC_RENAME;
+ enum lc_reason reason = LC_RENAME_VERBATIM;
int flag;
bool wrapped;