C++ PATCH: Remove unused compiler_error

Gabriel Dos Reis gdr@codesourcery.com
Sat Jun 15 05:40:00 GMT 2002


This patch removes compiler_error() from the C++ front-end.  That
function is unused and actually unnecessary.

Bootstrapped and tested on an i686-pc-linux-gnu

-- Gaby

2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>

	* cp-tree.h (compiler_error): Remove declaration.
	* lex.c (compiler_error): Remove definition.

Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/cp-tree.h,v
retrieving revision 1.717
diff -p -r1.717 cp-tree.h
*** cp-tree.h	4 Jun 2002 07:09:59 -0000	1.717
--- cp-tree.h	15 Jun 2002 11:56:56 -0000
*************** extern tree copy_decl                   
*** 4055,4062 ****
  extern tree copy_type                           PARAMS ((tree));
  extern tree cxx_make_type			PARAMS ((enum tree_code));
  extern tree make_aggr_type			PARAMS ((enum tree_code));
- extern void compiler_error			PARAMS ((const char *, ...))
-   ATTRIBUTE_PRINTF_1;
  extern void yyerror				PARAMS ((const char *));
  extern void yyhook				PARAMS ((int));
  extern int cp_type_qual_from_rid                PARAMS ((tree));
--- 4055,4060 ----
Index: lex.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/lex.c,v
retrieving revision 1.282
diff -p -r1.282 lex.c
*** lex.c	4 Jun 2002 07:10:10 -0000	1.282
--- lex.c	15 Jun 2002 11:56:56 -0000
*************** make_aggr_type (code)
*** 1596,1615 ****
    return t;
  }
  
- void
- compiler_error VPARAMS ((const char *msg, ...))
- {
-   char buf[1024];
- 
-   VA_OPEN (ap, msg);
-   VA_FIXEDARG (ap, const char *, msg);
- 
-   vsprintf (buf, msg, ap);
-   VA_CLOSE (ap);
- 
-   error_with_file_and_line (input_filename, lineno, "%s (compiler error)", buf);
- }
- 
  /* Return the type-qualifier corresponding to the identifier given by
     RID.  */
  
--- 1596,1601 ----



More information about the Gcc-patches mailing list