OSDN Git Service

* decl.c (init_decl_processing): Remove duplicate decl of
[pf3gnuchains/gcc-fork.git] / gcc / scan-decls.c
index 4246eea..13a09ac 100644 (file)
@@ -1,5 +1,5 @@
 /* scan-decls.c - Extracts declarations from cpp output.
-   Copyright (C) 1993, 1995, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1995, 97-99, 2000 Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -17,10 +17,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
    Written by Per Bothner <bothner@cygnus.com>, July 1993.  */
 
-#include <stdio.h>
-#include <ctype.h>
 #include "hconfig.h"
+#include "system.h"
 #include "cpplib.h"
+#include "scan.h"
+
+static void skip_to_closing_brace PARAMS ((cpp_reader *));
 
 int brace_nesting = 0;
 
@@ -77,8 +79,8 @@ Here dname is the actual name being declared.
 int
 scan_decls (pfile, argc, argv)
      cpp_reader *pfile;
-     int argc;
-     char **argv;
+     int argc ATTRIBUTE_UNUSED;
+     char **argv ATTRIBUTE_UNUSED;
 {
   int saw_extern, saw_inline;
   int start_written;
@@ -86,7 +88,7 @@ scan_decls (pfile, argc, argv)
      declarator.  If it is zero, we are either still parsing the
      decl-specs, or prev_id_start marks the start of the declarator.  */
   int declarator_start;
-  int prev_id_start, prev_id_end;
+  int prev_id_start, prev_id_end = 0;
   enum cpp_token token;
 
  new_statement:
@@ -169,7 +171,7 @@ scan_decls (pfile, argc, argv)
            }
          break;
        case CPP_OTHER:
-         if (CPP_WRITTEN (pfile) == start_written + 1
+         if (CPP_WRITTEN (pfile) == (size_t) start_written + 1
              && (CPP_PWRITTEN (pfile)[-1] == '*'
                  || CPP_PWRITTEN (pfile)[-1] == '&'))
            declarator_start = start_written;
@@ -189,7 +191,9 @@ scan_decls (pfile, argc, argv)
        maybe_handle_comma:
          if (token != CPP_COMMA)
            goto new_statement;
+#if 0
        handle_comma:
+#endif
          /* Handle multiple declarators in a single declaration,
             as in:  extern char *strcpy (), *strcat (), ... ; */
          if (declarator_start == 0)