/* 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
#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;
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;
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:
}
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;
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)