diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-07-10 18:49:24 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-07-10 18:49:24 +0200 |
commit | c26302d5351c07a12a5c434f392a5df89381dd8e (patch) | |
tree | fb33b01daeb32c3b1c99c9c4f1501ea19669801f /gcc/testsuite/c-c++-common/raw-string-18.c | |
parent | dfeadaa00be8251addff242849f6165ea9ee480c (diff) | |
download | gcc-c26302d5351c07a12a5c434f392a5df89381dd8e.zip gcc-c26302d5351c07a12a5c434f392a5df89381dd8e.tar.gz gcc-c26302d5351c07a12a5c434f392a5df89381dd8e.tar.bz2 |
c-ppoutput.c (scan_translation_unit): Call account_for_newlines for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
* c-ppoutput.c (scan_translation_unit): Call account_for_newlines
for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
* include/cpplib.h (cpp_token_val_index): Change parameter type to
const cpp_token *.
* lex.c (cpp_token_val_index): Likewise.
* c-c++-common/raw-string-18.c: New test.
* c-c++-common/raw-string-19.c: New test.
From-SVN: r200878
Diffstat (limited to 'gcc/testsuite/c-c++-common/raw-string-18.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/raw-string-18.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/raw-string-18.c b/gcc/testsuite/c-c++-common/raw-string-18.c new file mode 100644 index 0000000..8d4381d --- /dev/null +++ b/gcc/testsuite/c-c++-common/raw-string-18.c @@ -0,0 +1,21 @@ +/* PR preprocessor/57824 */ +/* { dg-do compile } */ +/* { dg-options "-std=gnu99 -fdump-tree-optimized-lineno" { target c } } */ +/* { dg-options "-std=c++11 -fdump-tree-optimized-lineno" { target c++ } } */ + +const char x[] = R"( +abc +def +ghi +)"; + +int +main () +{ + extern void foo (); foo (); + return 0; +} + +/* Verify call to foo is on line 15. */ +/* { dg-final { scan-tree-dump ": 15\[]:]\[^\n\r]*foo" "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ |