summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
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 d0c583d8691..195d728440c 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 76c297acdcb..6c4225c8be7 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 dc7b9c17ddc..84e2af695d1 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))
{