OSDN Git Service

* c-lex.c (c_lex): Rename to...
authorgiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 29 Jan 2004 04:19:01 +0000 (04:19 +0000)
committergiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 29 Jan 2004 04:19:01 +0000 (04:19 +0000)
(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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76844 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-lex.c
gcc/c-pragma.h

index fd66cf6..f3bff56 100644 (file)
@@ -1,3 +1,10 @@
+2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+
+       * 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.
+
 2004-01-28  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/mcore/mcore.c (mcore_external_libcall): Add a
index 5546fc9..4ead0c6 100644 (file)
@@ -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.  */
index cea410b..7158722 100644 (file)
@@ -55,5 +55,6 @@ extern tree maybe_apply_renaming_pragma (tree, tree);
 extern void add_to_renaming_pragma_list (tree, tree);
 
 extern int c_lex (tree *);
+extern int c_lex_with_flags (tree *, unsigned char *);
 
 #endif /* GCC_C_PRAGMA_H */