diff options
author | Markus Milleder <markus.milleder@generali.at> | 2008-03-06 19:08:40 +0100 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2008-03-06 18:08:40 +0000 |
commit | 830465c6ea14fa89df9b74106674d7ecf5b4ab31 (patch) | |
tree | 8b7e254009342f3af78130f33b14aea49e98ddcf /libcpp/mkdeps.c | |
parent | 48081aae38aa3f86d1c398e70563baf779b0054f (diff) | |
download | gcc-830465c6ea14fa89df9b74106674d7ecf5b4ab31.tar.gz |
re PR preprocessor/35458 (Dependency generation (-M) does not quote '#' in filenames)
libcpp
2008-03-06 Markus Milleder <markus.milleder@generali.at>
PR preprocessor/35458
* mkdeps.c (munge): Quote '#' with a '\'.
gcc/testsuite
2008-03-06 Markus Milleder <markus.milleder@generali.at>
PR preprocessor/35458
* gcc.dg/cpp/cmdlne-M-2.c: New file.
* gcc.dg/cpp/cmdlne-M-2#.h: New file.
* gcc.dg/cpp/#cmdlne-M-2.h: New file.
From-SVN: r132982
Diffstat (limited to 'libcpp/mkdeps.c')
-rw-r--r-- | libcpp/mkdeps.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libcpp/mkdeps.c b/libcpp/mkdeps.c index 11488ce908f..23d9dc1653d 100644 --- a/libcpp/mkdeps.c +++ b/libcpp/mkdeps.c @@ -79,6 +79,11 @@ munge (const char *filename) /* '$' is quoted by doubling it. */ len++; break; + + case '#': + /* '#' is quoted with a backslash. */ + len++; + break; } } @@ -100,6 +105,10 @@ munge (const char *filename) *dst++ = '$'; break; + case '#': + *dst++ = '\\'; + break; + default: /* nothing */; } |