aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>2004-01-29 04:19:01 +0000
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>2004-01-29 04:19:01 +0000
commit26105149cde1bb92dceeb7f3379d054f7fb2b50f (patch)
treebdcb6c18c14de6bbdd958a178f077df71d4ad489 /gcc/c-lex.c
parent1c56a12d695d3c51f0be2c2e0e0da257185fa229 (diff)
* c-lex.c (c_lex): Rename to...
(c_lex_with_flags): Add new parameter to get CPP flags. (c_lex): Thunk to c_lex_with_flags while keeping the old interface. * c-pragma.h (c_lex_with_flags): Declare. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@76844 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 5546fc9ddd1..4ead0c6e46f 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -324,7 +324,7 @@ get_nonpadding_token (void)
}
int
-c_lex (tree *value)
+c_lex_with_flags (tree *value, unsigned char *cpp_flags)
{
const cpp_token *tok;
location_t atloc;
@@ -436,9 +436,17 @@ c_lex (tree *value)
c_common_no_more_pch ();
}
+ if (cpp_flags)
+ *cpp_flags = tok->flags;
return tok->type;
}
+int
+c_lex (tree *value)
+{
+ return c_lex_with_flags (value, NULL);
+}
+
/* Returns the narrowest C-visible unsigned type, starting with the
minimum specified by FLAGS, that can fit VALUE, or itk_none if
there isn't one. */