This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH for toplev.h/errorcount



We didn't declare the various error-counting variables in toplev.h,
which means we end up declaring them locally in various places.  This
patch will allow a similar cleanup in several places in the C++
front-end.  OK to check in?

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

Sun Aug  1 23:45:34 1999  Mark Mitchell  <mark@codesourcery.com>

	* toplev.h (errorcount): Declare.
	(warningcount): Likewise.
	(sorrycount): Likewise.
	* c-lex.c (errorcount): Don't declare.
	* dwarf2out.c (errorcount): Don't declare.

Index: toplev.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/toplev.h,v
retrieving revision 1.23
diff -c -p -r1.23 toplev.h
*** toplev.h	1999/04/22 23:06:09	1.23
--- toplev.h	1999/08/02 06:41:13
*************** extern void fnotice			PROTO ((FILE *, co
*** 115,118 ****
--- 115,121 ----
  extern const char *trim_filename	PROTO ((const char *));
  extern int wrapup_global_declarations   PROTO ((union tree_node **, int));
  extern void check_global_declarations   PROTO ((union tree_node **, int));
+ extern int errorcount;
+ extern int warningcount;
+ extern int sorrycount;
  #endif /* __GCC_TOPLEV_H */
Index: c-lex.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-lex.c,v
retrieving revision 1.54
diff -c -p -r1.54 c-lex.c
*** c-lex.c	1999/07/21 12:48:05	1.54
--- c-lex.c	1999/08/02 06:40:51
*************** Boston, MA 02111-1307, USA.  */
*** 49,55 ****
  #include "cpplib.h"
  extern cpp_reader  parse_in;
  extern cpp_options parse_options;
- extern int errorcount;
  #else
  /* Stream for reading from the input file.  */
  FILE *finput;
--- 49,54 ----
Index: dwarf2out.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/dwarf2out.c,v
retrieving revision 1.98
diff -c -p -r1.98 dwarf2out.c
*** dwarf2out.c	1999/07/22 02:16:54	1.98
--- dwarf2out.c	1999/08/02 06:41:05
*************** gen_subprogram_die (decl, context_die)
*** 8374,8380 ****
  	     we should detect this case and ignore it.  For now, if we have
  	     already reported an error, any error at all, then assume that
  	     we got here because of a input error, not a dwarf2 bug.  */
- 	  extern int errorcount;
  	  if (errorcount)
  	    return;
  	  abort ();
--- 8374,8379 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]