aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-07-10 18:49:24 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2013-07-10 18:49:24 +0200
commitc26302d5351c07a12a5c434f392a5df89381dd8e (patch)
treefb33b01daeb32c3b1c99c9c4f1501ea19669801f /libcpp
parentdfeadaa00be8251addff242849f6165ea9ee480c (diff)
downloadgcc-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 'libcpp')
-rw-r--r--libcpp/ChangeLog4
-rw-r--r--libcpp/include/cpplib.h2
-rw-r--r--libcpp/lex.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index d0c583d..195d728 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,5 +1,9 @@
2013-07-10 Jakub Jelinek <jakub@redhat.com>
+ * include/cpplib.h (cpp_token_val_index): Change parameter type to
+ const cpp_token *.
+ * lex.c (cpp_token_val_index): Likewise.
+
PR preprocessor/57757
* lex.c (cpp_avoid_paste): Avoid pasting CPP_{,W,UTF8}STRING
or CPP_STRING{16,32} with CPP_NAME or SPELL_LITERAL token that
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 76c297a..6c4225c 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -248,7 +248,7 @@ struct GTY(()) cpp_token {
};
/* Say which field is in use. */
-extern enum cpp_token_fld_kind cpp_token_val_index (cpp_token *tok);
+extern enum cpp_token_fld_kind cpp_token_val_index (const cpp_token *tok);
/* A type wide enough to hold any multibyte source character.
cpplib's character constant interpreter requires an unsigned type.
diff --git a/libcpp/lex.c b/libcpp/lex.c
index dc7b9c1..84e2af6 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -3029,7 +3029,7 @@ _cpp_aligned_alloc (cpp_reader *pfile, size_t len)
/* Say which field of TOK is in use. */
enum cpp_token_fld_kind
-cpp_token_val_index (cpp_token *tok)
+cpp_token_val_index (const cpp_token *tok)
{
switch (TOKEN_SPELL (tok))
{