mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-25 21:04:51 +08:00
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
This commit is contained in:
parent
48081aae38
commit
830465c6ea
@ -1,3 +1,10 @@
|
||||
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.
|
||||
|
||||
2008-03-06 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* lib/treelang-dg.exp, lib/treelang.exp: Delete.
|
||||
|
1
gcc/testsuite/gcc.dg/cpp/#cmdlne-M-2.h
Normal file
1
gcc/testsuite/gcc.dg/cpp/#cmdlne-M-2.h
Normal file
@ -0,0 +1 @@
|
||||
/* empty */
|
1
gcc/testsuite/gcc.dg/cpp/cmdlne-M-2#.h
Normal file
1
gcc/testsuite/gcc.dg/cpp/cmdlne-M-2#.h
Normal file
@ -0,0 +1 @@
|
||||
/* empty */
|
14
gcc/testsuite/gcc.dg/cpp/cmdlne-M-2.c
Normal file
14
gcc/testsuite/gcc.dg/cpp/cmdlne-M-2.c
Normal file
@ -0,0 +1,14 @@
|
||||
/* Copyright (C) 2008 Free Software Foundation, Inc. */
|
||||
|
||||
/* { dg-do preprocess } */
|
||||
/* { dg-options "-M" } */
|
||||
|
||||
/* Test that dependency output suppresses warnings by implying -w. */
|
||||
|
||||
#include "#cmdlne-M-2.h"
|
||||
#include "cmdlne-M-2#.h"
|
||||
|
||||
/* { dg-final { scan-file cmdlne-M-2.i "(^|\\n)cmdlne-M-2.o:" } }
|
||||
{ dg-final { scan-file cmdlne-M-2.i "cmdlne-M-2.c" } }
|
||||
{ dg-final { scan-file cmdlne-M-2.i "\\\\#cmdlne-M-2.h" } }
|
||||
{ dg-final { scan-file cmdlne-M-2.i "cmdlne-M-2\\\\#.h" } } */
|
@ -1,3 +1,8 @@
|
||||
2008-03-06 Markus Milleder <markus.milleder@generali.at>
|
||||
|
||||
PR preprocessor/35458
|
||||
* mkdeps.c (munge): Quote '#' with a '\'.
|
||||
|
||||
2008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
PR preprocessor/35379
|
||||
|
@ -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 */;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user