749ced524c
* errors.h (warning, error, fatal, internal_error): Don't mark with ATTRIBUTE_PRINTF_n. * toplev.h (internal_error, fatal_io_error, warning, error, pedwarn, pedwarn_with_file_and_line, warning_with_file_and_line, error_with_file_and_line, sorry, error_for_asm, warning_for_asm): Likewise. cp: * Make-lang.in (CXX_OBJS): Take out cp/errfn.o. (cp/errfn.o): Delete rule. (cp/error.o): Depend on flags.h. * errfn.c: Delete file. * cp-tree.h: Declare warn_deprecated. Remove definitions of TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning, cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and internal_error respectively. Make cp_deprecated into a macro. Don't define cp_printer typedef or declare cp_printers. * error.c: Include flags.h. Delete: struct tree_formatting_info, print_function_argument_list, print_declaration, print_expression, print_function_declaration, print_function_parameter, print_type_id, print_cv_qualifier_seq, print_type_specifier_seq, print_simple_type_specifier, print_elaborated_type_specifier, print_rest_of_abstract_declarator, print_parameter_declaration_clause, print_exception_specification, print_nested_name_specifier, and definition of cp_printers. (locate_error): New function. (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and rewritten in terms of locate_error and diagnostic.c. (cp_tree_printer): Rename cp_printer; wire up to *_to_string instead of deleted print_* routines. Handle %C, %L, %O, %Q also. (init_error): Adjust to match. po: * POTFILES.in: Remove cp/errfn.c. From-SVN: r45765
44 lines
1.6 KiB
C
44 lines
1.6 KiB
C
/* Basic error reporting routines.
|
|
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
|
|
|
This file is part of GCC.
|
|
|
|
GCC is free software; you can redistribute it and/or modify it under
|
|
the terms of the GNU General Public License as published by the Free
|
|
Software Foundation; either version 2, or (at your option) any later
|
|
version.
|
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GCC; see the file COPYING. If not, write to the Free
|
|
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
02111-1307, USA. */
|
|
|
|
/* warning, error, and fatal. These definitions are suitable for use
|
|
in the generator programs; eventually we would like to use them in
|
|
cc1 too, but that's a longer term project.
|
|
|
|
N.B. We cannot presently use ATTRIBUTE_PRINTF with these functions,
|
|
because they can be extended with additional format specifiers which
|
|
GCC does not know about. */
|
|
|
|
#ifndef GCC_ERRORS_H
|
|
#define GCC_ERRORS_H
|
|
|
|
extern void warning PARAMS ((const char *, ...));
|
|
extern void error PARAMS ((const char *, ...));
|
|
extern void fatal PARAMS ((const char *, ...)) ATTRIBUTE_NORETURN;
|
|
extern void internal_error PARAMS ((const char *, ...)) ATTRIBUTE_NORETURN;
|
|
extern const char *trim_filename PARAMS ((const char *));
|
|
extern void fancy_abort PARAMS ((const char *, int, const char *))
|
|
ATTRIBUTE_NORETURN;
|
|
|
|
extern int have_error;
|
|
extern const char *progname;
|
|
|
|
#endif /* ! GCC_ERRORS_H */
|