OSDN Git Service

2002-05-27 H.J. Lu (hjl@gnu.org)
[pf3gnuchains/gcc-fork.git] / gcc / c-lex.c
index 9679b60..292c267 100644 (file)
@@ -27,7 +27,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "expr.h"
 #include "input.h"
 #include "output.h"
-#include "c-lex.h"
 #include "c-tree.h"
 #include "c-common.h"
 #include "flags.h"
@@ -39,7 +38,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "tm_p.h"
 #include "splay-tree.h"
 #include "debug.h"
-#include "target.h"
 
 #ifdef MULTIBYTE_CHARS
 #include "mbchar.h"
@@ -68,7 +66,6 @@ extern FILE *asm_out_file;
 /* Number of bytes in a wide character.  */
 #define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT)
 
-int indent_level;        /* Number of { minus number of }.  */
 int pending_lang_change; /* If we need to switch languages - C++ only */
 int c_header_level;     /* depth in C headers - C++ only */
 
@@ -81,7 +78,6 @@ static tree lex_string                PARAMS ((const unsigned char *, unsigned int,
 static tree lex_charconst      PARAMS ((const cpp_token *));
 static void update_header_times        PARAMS ((const char *));
 static int dump_one_header     PARAMS ((splay_tree_node, void *));
-static void cb_register_builtins PARAMS ((cpp_reader *));
 static void cb_line_change     PARAMS ((cpp_reader *, const cpp_token *, int));
 static void cb_ident           PARAMS ((cpp_reader *, unsigned int,
                                         const cpp_string *));
@@ -123,7 +119,6 @@ init_c_lex (filename)
   cb->ident = cb_ident;
   cb->file_change = cb_file_change;
   cb->def_pragma = cb_def_pragma;
-  cb->register_builtins = cb_register_builtins;
 
   /* Set the debug callbacks if we can use them.  */
   if (debug_info_level == DINFO_LEVEL_VERBOSE
@@ -228,25 +223,6 @@ dump_time_statistics ()
   splay_tree_foreach (file_info_tree, dump_one_header, 0);
 }
 
-/* Register preprocessor built-ins.  */
-static void
-cb_register_builtins (pfile)
-     cpp_reader *pfile;
-{
-  if (c_language == clk_cplusplus)
-    {
-      if (SUPPORTS_ONE_ONLY)
-       cpp_define (pfile, "__GXX_WEAK__");
-      else
-       cpp_define (pfile, "__GXX_WEAK__=0");
-    }
-
-  (*targetm.register_cpp_builtins) (pfile);
-}
-
-/* Not yet handled: #pragma, #define, #undef.
-   No need to deal with linemarkers under normal conditions.  */
-
 static void
 cb_ident (pfile, line, str)
      cpp_reader *pfile ATTRIBUTE_UNUSED;
@@ -293,7 +269,6 @@ cb_file_change (pfile, new_map)
 
          lineno = included_at;
          push_srcloc (new_map->to_file, 1);
-         input_file_stack->indent_level = indent_level;
          (*debug_hooks->start_source_file) (included_at, new_map->to_file);
 #ifndef NO_IMPLICIT_EXTERN_C
          if (c_header_level)
@@ -316,16 +291,6 @@ cb_file_change (pfile, new_map)
          --pending_lang_change;
        }
 #endif
-#if 0
-      if (indent_level != input_file_stack->indent_level)
-       {
-         warning_with_file_and_line
-           (input_filename, lineno,
-            "this file contains more '%c's than '%c's",
-            indent_level > input_file_stack->indent_level ? '{' : '}',
-            indent_level > input_file_stack->indent_level ? '}' : '{');
-       }
-#endif
       pop_srcloc ();
       
       (*debug_hooks->end_source_file) (to_line);
@@ -740,9 +705,6 @@ c_lex (value)
   *value = NULL_TREE;
   switch (tok->type)
     {
-    case CPP_OPEN_BRACE:  indent_level++;  break;
-    case CPP_CLOSE_BRACE: indent_level--;  break;
-
     /* Issue this error here, where we can get at tok->val.c.  */
     case CPP_OTHER:
       if (ISGRAPH (tok->val.c))
@@ -1359,7 +1321,7 @@ lex_charconst (token)
   unsigned int chars_seen;
   int unsignedp;
  
-  result = cpp_interpret_charconst (parse_in, token, warn_multichar,
+  result = cpp_interpret_charconst (parse_in, token,
                                    &chars_seen, &unsignedp);
 
   /* Cast to cppchar_signed_t to get correct sign-extension of RESULT