PATCH to prototype error functions

Mark Mitchell mark@markmitchell.com
Mon Sep 7 12:16:00 GMT 1998


(Apologies for the resend; first version did not actually include the
patch.) 

This patch, developed with Kaveh Ghazi's assistance, adds prototypes
for the error functions in cp-tree.h.

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com

1998-09-07  Mark Mitchell  <mark@markmitchell.com>
	    and Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
	
	* cp-tree.h (cp_error): Prototype.
	(cp_error_at): Likewise.
	(cp_warning): Likewise.
	(cp_warning_at): Likewise.
	(cp_pedwarn): Likewise.
	(cp_pedwarn_at): Likewise.
	(cp_compiler_error): Likewise.
	(cp_sprintf): Likewise.
	(cp_enable_warning): Likewise.
	* errfn.c: Remove hack to avoid error-function prototypes when
	including cp-tree.h.
	
Index: cp-tree.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/cp-tree.h,v
retrieving revision 1.135
diff -c -p -r1.135 cp-tree.h
*** cp-tree.h	1998/09/06 19:44:40	1.135
--- cp-tree.h	1998/09/07 18:29:47
*************** extern tree handle_class_head			PROTO((t
*** 2640,2655 ****
  extern tree lookup_arg_dependent                PROTO((tree, tree, tree));
  
  /* in errfn.c */
! #ifndef NO_CP_ERROR_FNS
! extern void cp_error				();
! extern void cp_error_at				();
! extern void cp_warning				();
! extern void cp_warning_at			();
! extern void cp_pedwarn				();
! extern void cp_pedwarn_at			();
! extern void cp_compiler_error			();
! extern void cp_sprintf				();
! #endif
  extern void cp_enable_warning                   PROTO((int, int));
  
  /* in error.c */
--- 2640,2653 ----
  extern tree lookup_arg_dependent                PROTO((tree, tree, tree));
  
  /* in errfn.c */
! extern void cp_error				PVPROTO((error_code, ...));
! extern void cp_error_at				PVPROTO((error_code, ...));
! extern void cp_warning				PVPROTO((error_code, ...));
! extern void cp_warning_at			PVPROTO((error_code, ...));
! extern void cp_pedwarn				PVPROTO((error_code, ...));
! extern void cp_pedwarn_at			PVPROTO((error_code, ...));
! extern void cp_compiler_error			PVPROTO((error_code, ...));
! extern void cp_sprintf				PVPROTO((error_code, ...));
  extern void cp_enable_warning                   PROTO((int, int));
  
  /* in error.c */
Index: errfn.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/errfn.c,v
retrieving revision 1.15
diff -c -p -r1.15 errfn.c
*** errfn.c	1998/09/06 19:44:46	1.15
--- errfn.c	1998/09/07 18:29:49
*************** Boston, MA 02111-1307, USA.  */
*** 23,31 ****
  #include "system.h"
  #include "tree.h"
  #include "toplev.h"
- /* The declarations of cp_error and such here are incompatible with
-    those in cp-tree.h.  */
- #define NO_CP_ERROR_FNS
  #include "cp-tree.h"
  
  /* cp_printer is the type of a function which converts an argument into
--- 23,28 ----



More information about the Gcc-patches mailing list