Commit 749ced52 by Zack Weinberg

top level:

	* 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
parent 7a80cf9a
2001-09-23 Zack Weinberg <zack@codesourcery.com>
* 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.
Sun Sep 23 18:19:48 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Sun Sep 23 18:19:48 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* function.c (pop_function_context_from): var_refs_queue * function.c (pop_function_context_from): var_refs_queue
......
2001-09-23 Zack Weinberg <zack@codesourcery.com>
* 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.
Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* Make-lang.in (CXX_C_OBJS): Add attribs.o. * Make-lang.in (CXX_C_OBJS): Add attribs.o.
......
...@@ -97,7 +97,7 @@ CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \ ...@@ -97,7 +97,7 @@ CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \
c-dump.o $(CXX_TARGET_OBJS) c-dump.o $(CXX_TARGET_OBJS)
# Language-specific object files. # Language-specific object files.
CXX_OBJS = cp/call.o cp/decl.o cp/errfn.o cp/expr.o cp/pt.o cp/typeck2.o \ CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parse.o cp/ptree.o cp/rtti.o \ cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parse.o cp/ptree.o cp/rtti.o \
cp/spew.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \ cp/spew.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \
cp/search.o cp/semantics.o cp/tree.o cp/xref.o cp/repo.o cp/dump.o \ cp/search.o cp/semantics.o cp/tree.o cp/xref.o cp/repo.o cp/dump.o \
...@@ -271,8 +271,7 @@ cp/expr.o: cp/expr.c $(CXX_TREE_H) $(RTL_H) flags.h $(EXPR_H) toplev.h \ ...@@ -271,8 +271,7 @@ cp/expr.o: cp/expr.c $(CXX_TREE_H) $(RTL_H) flags.h $(EXPR_H) toplev.h \
cp/xref.o: cp/xref.c $(CXX_TREE_H) input.h toplev.h cp/xref.o: cp/xref.c $(CXX_TREE_H) input.h toplev.h
cp/pt.o: cp/pt.c $(CXX_TREE_H) cp/decl.h cp/parse.h cp/lex.h toplev.h \ cp/pt.o: cp/pt.c $(CXX_TREE_H) cp/decl.h cp/parse.h cp/lex.h toplev.h \
$(GGC_H) $(RTL_H) except.h $(GGC_H) $(RTL_H) except.h
cp/error.o: cp/error.c $(CXX_TREE_H) toplev.h diagnostic.h real.h cp/error.o: cp/error.c $(CXX_TREE_H) toplev.h diagnostic.h flags.h real.h
cp/errfn.o: cp/errfn.c $(CXX_TREE_H) toplev.h
cp/repo.o: cp/repo.c $(CXX_TREE_H) toplev.h $(GGC_H) diagnostic.h cp/repo.o: cp/repo.c $(CXX_TREE_H) toplev.h $(GGC_H) diagnostic.h
cp/semantics.o: cp/semantics.c $(CXX_TREE_H) cp/lex.h except.h toplev.h \ cp/semantics.o: cp/semantics.c $(CXX_TREE_H) cp/lex.h except.h toplev.h \
flags.h $(GGC_H) debug.h output.h $(RTL_H) $(TIMEVAR_H) $(EXPR_H) flags.h $(GGC_H) debug.h output.h $(RTL_H) $(TIMEVAR_H) $(EXPR_H)
......
...@@ -997,6 +997,10 @@ extern int warn_old_style_cast; ...@@ -997,6 +997,10 @@ extern int warn_old_style_cast;
extern int warn_reorder; extern int warn_reorder;
/* Non-zero means warn about deprecated features. */
extern int warn_deprecated;
/* Nonzero means to treat bitfields as unsigned unless they say `signed'. */ /* Nonzero means to treat bitfields as unsigned unless they say `signed'. */
extern int flag_signed_bitfields; extern int flag_signed_bitfields;
...@@ -3433,11 +3437,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; ...@@ -3433,11 +3437,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
/* These constants can used as bit flags in the process of tree formatting. /* These constants can used as bit flags in the process of tree formatting.
TFF_PLAIN_IDENTIFIER: unqualified part of a name. TFF_PLAIN_IDENTIFIER: unqualified part of a name.
TFF_NAMESPACE_SCOPE: the complete qualified-id form of a name. TFF_SCOPE: include the class and namespace scope of the name.
TFF_CLASS_SCOPE: if possible, include the class-name part of a
qualified-id. This flag may be implied in some circumstances by
TFF_NAMESPACE_SCOPE.
TFF_SCOPE: the combination of the two above.
TFF_CHASE_TYPEDEF: print the original type-id instead of the typedef-name. TFF_CHASE_TYPEDEF: print the original type-id instead of the typedef-name.
TFF_DECL_SPECIFIERS: print decl-specifiers. TFF_DECL_SPECIFIERS: print decl-specifiers.
TFF_CLASS_KEY_OR_ENUM: precede a class-type name (resp. enum name) with TFF_CLASS_KEY_OR_ENUM: precede a class-type name (resp. enum name) with
...@@ -3447,25 +3447,20 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; ...@@ -3447,25 +3447,20 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
TFF_EXCEPTION_SPECIFICATION: show function exception specification. TFF_EXCEPTION_SPECIFICATION: show function exception specification.
TFF_TEMPLATE_HEADER: show the template<...> header in a TFF_TEMPLATE_HEADER: show the template<...> header in a
template-declaration. template-declaration.
TFF_TEMPLATE_DEFAULT_ARGUMENTS: show template parameter default values.
TFF_TEMPLATE_NAME: show only template-name. TFF_TEMPLATE_NAME: show only template-name.
TFF_EXPR_IN_PARENS: Parenthesize expressions. */ TFF_EXPR_IN_PARENS: Parenthesize expressions. */
#define TFF_PLAIN_IDENTIFIER (0) #define TFF_PLAIN_IDENTIFIER (0)
#define TFF_NAMESPACE_SCOPE (1) #define TFF_SCOPE (1)
#define TFF_CLASS_SCOPE (1 << 1) #define TFF_CHASE_TYPEDEF (1 << 1)
#define TFF_CHASE_NAMESPACE_ALIAS (1 << 2) #define TFF_DECL_SPECIFIERS (1 << 2)
#define TFF_CHASE_TYPEDEF (1 << 3) #define TFF_CLASS_KEY_OR_ENUM (1 << 3)
#define TFF_DECL_SPECIFIERS (1 << 4) #define TFF_RETURN_TYPE (1 << 4)
#define TFF_CLASS_KEY_OR_ENUM (1 << 5) #define TFF_FUNCTION_DEFAULT_ARGUMENTS (1 << 5)
#define TFF_RETURN_TYPE (1 << 6) #define TFF_EXCEPTION_SPECIFICATION (1 << 6)
#define TFF_FUNCTION_DEFAULT_ARGUMENTS (1 << 7) #define TFF_TEMPLATE_HEADER (1 << 7)
#define TFF_EXCEPTION_SPECIFICATION (1 << 8) #define TFF_TEMPLATE_NAME (1 << 8)
#define TFF_TEMPLATE_HEADER (1 << 9) #define TFF_EXPR_IN_PARENS (1 << 9)
#define TFF_TEMPLATE_DEFAULT_ARGUMENTS (1 << 10)
#define TFF_TEMPLATE_NAME (1 << 11)
#define TFF_EXPR_IN_PARENS (1 << 12)
#define TFF_SCOPE (TFF_NAMESPACE_SCOPE | TFF_CLASS_SCOPE)
/* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM /* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM
node. */ node. */
...@@ -3779,17 +3774,24 @@ extern tree set_guard PARAMS ((tree)); ...@@ -3779,17 +3774,24 @@ extern tree set_guard PARAMS ((tree));
/* in parse.y */ /* in parse.y */
extern void cp_parse_init PARAMS ((void)); extern void cp_parse_init PARAMS ((void));
/* in errfn.c */ /* Obsolete names, formerly found in errfn.c, which no longer exists.
/* The cp_* functions aren't suitable for ATTRIBUTE_PRINTF. */ These are all variadic functions and therefore cannot be defined
extern void cp_error PARAMS ((const char *, ...)); as function-like macros. */
extern void cp_error_at PARAMS ((const char *, ...)); #define cp_error error
extern void cp_warning PARAMS ((const char *, ...)); #define cp_warning warning
extern void cp_warning_at PARAMS ((const char *, ...)); #define cp_pedwarn pedwarn
extern void cp_pedwarn PARAMS ((const char *, ...)); #define cp_compiler_error internal_error
extern void cp_pedwarn_at PARAMS ((const char *, ...));
extern void cp_compiler_error PARAMS ((const char *, ...)); extern void cp_error_at PARAMS ((const char *msgid, ...));
extern void cp_sprintf PARAMS ((const char *, ...)); extern void cp_warning_at PARAMS ((const char *msgid, ...));
extern void cp_deprecated PARAMS ((const char*)); extern void cp_pedwarn_at PARAMS ((const char *msgid, ...));
/* XXX Not i18n clean. */
#define cp_deprecated(str) \
do { if (warn_deprecated) \
cp_warning("%s is deprecated, please see the documentation for details", \
str); \
} while (0)
/* in error.c */ /* in error.c */
extern void init_error PARAMS ((void)); extern void init_error PARAMS ((void));
...@@ -3802,13 +3804,6 @@ extern const char *cp_file_of PARAMS ((tree)); ...@@ -3802,13 +3804,6 @@ extern const char *cp_file_of PARAMS ((tree));
extern int cp_line_of PARAMS ((tree)); extern int cp_line_of PARAMS ((tree));
extern const char *language_to_string PARAMS ((enum languages, int)); extern const char *language_to_string PARAMS ((enum languages, int));
extern void print_instantiation_context PARAMS ((void)); extern void print_instantiation_context PARAMS ((void));
/* cp_printer is the type of a function which converts an argument into
a string for digestion by printf. The cp_printer function should deal
with all memory management; the functions in errfn will not free
the char*s returned. See error.c for an example use of this code. */
typedef const char *cp_printer PARAMS ((tree, int));
extern cp_printer *cp_printers[256];
/* in except.c */ /* in except.c */
extern void init_exception_processing PARAMS ((void)); extern void init_exception_processing PARAMS ((void));
......
/* Provide a call-back mechanism for handling error output.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by Jason Merrill (jason@cygnus.com)
This file is part of GNU CC.
GNU CC 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.
GNU CC 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 GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "tree.h"
#include "cp-tree.h"
#include "toplev.h"
/* Whether or not we should try to be quiet for errors and warnings; this is
used to avoid being too talkative about problems with tentative choices
when we're computing the conversion costs for a method call. */
int cp_silent = 0;
typedef void errorfn (); /* deliberately vague */
static void cp_thing PARAMS ((errorfn *, int, const char *, va_list));
#define STRDUP(f) (ap = (char *) alloca (strlen (f) +1), strcpy (ap, (f)), ap)
/* This function supports only `%s', `%d', `%%', and the C++ print
codes. */
static void
cp_thing (errfn, atarg1, format, ap)
errorfn *errfn;
int atarg1;
const char *format;
va_list ap;
{
static char *buf;
static long buflen;
int nargs = 0;
long len;
long offset;
const char *f;
tree atarg = 0;
len = strlen (format) + 1;
if (len > buflen)
{
buflen = len;
buf = xrealloc (buf, buflen);
}
offset = 0;
for (f = format; *f; ++f)
{
cp_printer * function;
int alternate;
int maybe_here;
/* ignore text */
if (*f != '%')
{
buf[offset++] = *f;
continue;
}
++f;
alternate = 0;
maybe_here = 0;
/* Check for '+' and '#' (in that order). */
if (*f == '+')
{
maybe_here = 1;
++f;
}
if (*f == '#')
{
alternate = 1;
++f;
}
/* no field width or precision */
function = cp_printers[(int)*f];
if (function || *f == 's')
{
const char *p;
int plen;
if (*f == 's')
{
p = va_arg (ap, char *);
nargs++;
}
else
{
tree t = va_arg (ap, tree);
nargs++;
/* This indicates that ATARG comes from a different
location than normal. */
if (maybe_here && atarg1)
atarg = t;
/* If atarg1 is set and this is the first argument, then
set ATARG appropriately. */
if (atarg1 && nargs == 1)
atarg = t;
p = (*function) (t, alternate);
}
plen = strlen (p);
len += plen;
if (len > buflen)
{
buflen = len;
buf = xrealloc (buf, len);
}
strcpy (buf + offset, p);
offset += plen;
}
else if (*f == '%')
{
/* A `%%' has occurred in the input string. Replace it with
a `%' in the formatted message buf. */
if (++len > buflen)
{
buflen = len;
buf = xrealloc (buf, len);
}
buf[offset++] = '%';
}
else
{
if (*f != 'd')
abort ();
len += HOST_BITS_PER_INT / 2;
if (len > buflen)
{
buflen = len;
buf = xrealloc (buf, len);
}
sprintf (buf + offset, "%d", va_arg (ap, int));
nargs++;
offset += strlen (buf + offset);
/* With an ANSI C library one could write
out += sprintf (...); */
}
}
buf[offset] = '\0';
/* If ATARG1 is set, but we haven't extracted any arguments, then
extract one tree argument for ATARG. */
if (nargs == 0 && atarg1)
atarg = va_arg (ap, tree);
if (atarg)
{
const char *file = cp_file_of (atarg);
int line = cp_line_of (atarg);
(*errfn) (file, line, "%s", buf);
}
else
(*errfn) ("%s", buf);
}
void
cp_error VPARAMS ((const char *format, ...))
{
VA_OPEN (ap, format);
VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) error, 0, format, ap);
VA_CLOSE (ap);
}
void
cp_warning VPARAMS ((const char *format, ...))
{
VA_OPEN (ap, format);
VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) warning, 0, format, ap);
VA_CLOSE (ap);
}
void
cp_pedwarn VPARAMS ((const char *format, ...))
{
VA_OPEN (ap, format);
VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) pedwarn, 0, format, ap);
VA_CLOSE (ap);
}
void
cp_compiler_error VPARAMS ((const char *format, ...))
{
VA_OPEN (ap, format);
VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) compiler_error, 0, format, ap);
VA_CLOSE (ap);
}
void
cp_deprecated (msg)
const char *msg;
{
extern int warn_deprecated;
if (!warn_deprecated)
return;
cp_warning ("%s is deprecated, please see the documentation for details", msg);
}
void
cp_sprintf VPARAMS ((const char *format, ...))
{
VA_OPEN (ap, format);
VA_FIXEDARG (ap, const char *, format);
cp_thing ((errorfn *) sprintf, 0, format, ap);
VA_CLOSE (ap);
}
void
cp_error_at VPARAMS ((const char *format, ...))
{
VA_OPEN (ap, format);
VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) error_with_file_and_line, 1, format, ap);
VA_CLOSE (ap);
}
void
cp_warning_at VPARAMS ((const char *format, ...))
{
VA_OPEN (ap, format);
VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) warning_with_file_and_line, 1, format, ap);
VA_CLOSE (ap);
}
void
cp_pedwarn_at VPARAMS ((const char *format, ...))
{
VA_OPEN (ap, format);
VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) pedwarn_with_file_and_line, 1, format, ap);
VA_CLOSE (ap);
}
...@@ -20,17 +20,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -20,17 +20,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* warning, error, and fatal. These definitions are suitable for use /* warning, error, and fatal. These definitions are suitable for use
in the generator programs; eventually we would like to use them in in the generator programs; eventually we would like to use them in
cc1 too, but that's a longer term project. */ 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 #ifndef GCC_ERRORS_H
#define GCC_ERRORS_H #define GCC_ERRORS_H
extern void warning PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; extern void warning PARAMS ((const char *, ...));
extern void error PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; extern void error PARAMS ((const char *, ...));
extern void fatal PARAMS ((const char *, ...)) extern void fatal PARAMS ((const char *, ...)) ATTRIBUTE_NORETURN;
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; extern void internal_error PARAMS ((const char *, ...)) ATTRIBUTE_NORETURN;
extern void internal_error PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern const char *trim_filename PARAMS ((const char *)); extern const char *trim_filename PARAMS ((const char *));
extern void fancy_abort PARAMS ((const char *, int, const char *)) extern void fancy_abort PARAMS ((const char *, int, const char *))
ATTRIBUTE_NORETURN; ATTRIBUTE_NORETURN;
......
2001-09-23 Zack Weinberg <zack@codesourcery.com>
* POTFILES.in: Remove cp/errfn.c.
2001-08-01 Nick Clifton <nickc@cambridge.redhat.com> 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
* POTFILES.in: Remove chorus.h files from i386, rs6000 and sparc * POTFILES.in: Remove chorus.h files from i386, rs6000 and sparc
......
...@@ -665,7 +665,6 @@ cp/decl.c ...@@ -665,7 +665,6 @@ cp/decl.c
cp/decl.h cp/decl.h
cp/decl2.c cp/decl2.c
cp/dump.c cp/dump.c
cp/errfn.c
cp/error.c cp/error.c
cp/except.c cp/except.c
cp/expr.c cp/expr.c
......
...@@ -39,10 +39,8 @@ extern void strip_off_ending PARAMS ((char *, int)); ...@@ -39,10 +39,8 @@ extern void strip_off_ending PARAMS ((char *, int));
extern void print_time PARAMS ((const char *, long)); extern void print_time PARAMS ((const char *, long));
extern const char *trim_filename PARAMS ((const char *)); extern const char *trim_filename PARAMS ((const char *));
extern void internal_error PARAMS ((const char *, ...)) extern void internal_error PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1
ATTRIBUTE_NORETURN; ATTRIBUTE_NORETURN;
extern void fatal_io_error PARAMS ((const char *, ...)) extern void fatal_io_error PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1
ATTRIBUTE_NORETURN; ATTRIBUTE_NORETURN;
extern void _fatal_insn_not_found PARAMS ((struct rtx_def *, extern void _fatal_insn_not_found PARAMS ((struct rtx_def *,
const char *, int, const char *, int,
...@@ -59,26 +57,21 @@ extern void _fatal_insn PARAMS ((const char *, ...@@ -59,26 +57,21 @@ extern void _fatal_insn PARAMS ((const char *,
#define fatal_insn_not_found(insn) \ #define fatal_insn_not_found(insn) \
_fatal_insn_not_found (insn, __FILE__, __LINE__, __FUNCTION__) _fatal_insn_not_found (insn, __FILE__, __LINE__, __FUNCTION__)
extern void warning PARAMS ((const char *, ...)) /* None of these functions are suitable for ATTRIBUTE_PRINTF, because
ATTRIBUTE_PRINTF_1; each language front end can extend them with its own set of format
extern void error PARAMS ((const char *, ...)) specifiers. */
ATTRIBUTE_PRINTF_1; extern void warning PARAMS ((const char *, ...));
extern void error PARAMS ((const char *, ...));
extern void fatal_error PARAMS ((const char *, ...)) extern void fatal_error PARAMS ((const char *, ...))
ATTRIBUTE_NORETURN ATTRIBUTE_NORETURN;
ATTRIBUTE_PRINTF_1; extern void pedwarn PARAMS ((const char *, ...));
extern void pedwarn PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1;
extern void pedwarn_with_file_and_line PARAMS ((const char *, int, extern void pedwarn_with_file_and_line PARAMS ((const char *, int,
const char *, ...)) const char *, ...));
ATTRIBUTE_PRINTF_3;
extern void warning_with_file_and_line PARAMS ((const char *, int, extern void warning_with_file_and_line PARAMS ((const char *, int,
const char *, ...)) const char *, ...));
ATTRIBUTE_PRINTF_3;
extern void error_with_file_and_line PARAMS ((const char *, int, extern void error_with_file_and_line PARAMS ((const char *, int,
const char *, ...)) const char *, ...));
ATTRIBUTE_PRINTF_3; extern void sorry PARAMS ((const char *, ...));
extern void sorry PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1;
extern void report_error_function PARAMS ((const char *)); extern void report_error_function PARAMS ((const char *));
extern void rest_of_decl_compilation PARAMS ((union tree_node *, extern void rest_of_decl_compilation PARAMS ((union tree_node *,
...@@ -86,7 +79,6 @@ extern void rest_of_decl_compilation PARAMS ((union tree_node *, ...@@ -86,7 +79,6 @@ extern void rest_of_decl_compilation PARAMS ((union tree_node *,
extern void rest_of_type_compilation PARAMS ((union tree_node *, int)); extern void rest_of_type_compilation PARAMS ((union tree_node *, int));
extern void rest_of_compilation PARAMS ((union tree_node *)); extern void rest_of_compilation PARAMS ((union tree_node *));
/* The *_with_decl functions aren't suitable for ATTRIBUTE_PRINTF. */
extern void pedwarn_with_decl PARAMS ((union tree_node *, extern void pedwarn_with_decl PARAMS ((union tree_node *,
const char *, ...)); const char *, ...));
extern void warning_with_decl PARAMS ((union tree_node *, extern void warning_with_decl PARAMS ((union tree_node *,
...@@ -97,11 +89,9 @@ extern void error_with_decl PARAMS ((union tree_node *, ...@@ -97,11 +89,9 @@ extern void error_with_decl PARAMS ((union tree_node *,
extern void announce_function PARAMS ((union tree_node *)); extern void announce_function PARAMS ((union tree_node *));
extern void error_for_asm PARAMS ((struct rtx_def *, extern void error_for_asm PARAMS ((struct rtx_def *,
const char *, ...)) const char *, ...));
ATTRIBUTE_PRINTF_2;
extern void warning_for_asm PARAMS ((struct rtx_def *, extern void warning_for_asm PARAMS ((struct rtx_def *,
const char *, ...)) const char *, ...));
ATTRIBUTE_PRINTF_2;
extern int do_float_handler PARAMS ((void (*) (PTR), PTR)); extern int do_float_handler PARAMS ((void (*) (PTR), PTR));
#ifdef BUFSIZ #ifdef BUFSIZ
...@@ -113,6 +103,8 @@ extern void botch PARAMS ((const char *)) ...@@ -113,6 +103,8 @@ extern void botch PARAMS ((const char *))
ATTRIBUTE_NORETURN; ATTRIBUTE_NORETURN;
#ifdef BUFSIZ #ifdef BUFSIZ
/* N.B. Unlike all the others, fnotice is just gettext+fprintf, and
therefore it can have ATTRIBUTE_PRINTF. */
extern void fnotice PARAMS ((FILE *, const char *, ...)) extern void fnotice PARAMS ((FILE *, const char *, ...))
ATTRIBUTE_PRINTF_2; ATTRIBUTE_PRINTF_2;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment