Commit fbfc1192 by Zack Weinberg Committed by Zack Weinberg

diagnostic.c (trim_filename, [...]): Moved here from rtl.c.

	* diagnostic.c (trim_filename, fancy_abort): Moved here from
	rtl.c.
	(fatal_function, set_fatal_function): Removed.
	(fatal): Don't prepare for or call the fatal_function.
	(diagnostic_lock, error_recursion): New.
	(diagnostic_for_decl, report_diagnostic): Guard against
	re-entering the error reporting routines.
	(fancy_abort): Assume function is not NULL.

	* errors.c (fancy_abort): New.  Assume function is not NULL.
	* tradcpp.c (fancy_abort): Assume function is not NULL.

	* system.h: Provide default definition of __FUNCTION__.
	* rtl.h: Use __FUNCTION__ not __PRETTY_FUNCTION__ throughout.
	Always use __FUNCTION__ in definition of abort.
	* tree.h: Likewise.
	* varray.h: Likewise.
	* toplev.h: Likewise.  Don't prototype set_fatal_function.

From-SVN: r35170
parent 1b493b81
2000-07-21 Zack Weinberg <zack@wolery.cumb.org>
* diagnostic.c (trim_filename, fancy_abort): Moved here from
rtl.c.
(fatal_function, set_fatal_function): Removed.
(fatal): Don't prepare for or call the fatal_function.
(diagnostic_lock, error_recursion): New.
(diagnostic_for_decl, report_diagnostic): Guard against
re-entering the error reporting routines.
(fancy_abort): Assume function is not NULL.
* errors.c (fancy_abort): New. Assume function is not NULL.
* tradcpp.c (fancy_abort): Assume function is not NULL.
* system.h: Provide default definition of __FUNCTION__.
* rtl.h: Use __FUNCTION__ not __PRETTY_FUNCTION__ throughout.
Always use __FUNCTION__ in definition of abort.
* tree.h: Likewise.
* varray.h: Likewise.
* toplev.h: Likewise. Don't prototype set_fatal_function.
2000-07-20 Geoff Keating <geoffk@cygnus.com> 2000-07-20 Geoff Keating <geoffk@cygnus.com>
* config/rs6000/aix43.h (CPP_SPEC): Define __LONG_MAX__ correctly * config/rs6000/aix43.h (CPP_SPEC): Define __LONG_MAX__ correctly
...@@ -20,7 +41,7 @@ ...@@ -20,7 +41,7 @@
HImode, and SFmode in 32-bit mode, and DFmode in 64-bit mode. HImode, and SFmode in 32-bit mode, and DFmode in 64-bit mode.
* config/rs6000/sysv4.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Add * config/rs6000/sysv4.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Add
MODE parameter. Put small constants in the TOC. MODE parameter. Put small constants in the TOC.
* config/rs6000/rs6000.c (easy_fp_constant_p): All constants are * config/rs6000/rs6000.c (easy_fp_constant_p): All constants are
easy in SImode. easy in SImode.
(rs6000_emit_move): When reload calls us with an illegitimate (rs6000_emit_move): When reload calls us with an illegitimate
......
...@@ -96,6 +96,9 @@ static void maybe_wrap_text PARAMS ((output_buffer *, const char *, ...@@ -96,6 +96,9 @@ static void maybe_wrap_text PARAMS ((output_buffer *, const char *,
static void clear_text_info PARAMS ((output_buffer *)); static void clear_text_info PARAMS ((output_buffer *));
static void clear_diagnostic_info PARAMS ((output_buffer *)); static void clear_diagnostic_info PARAMS ((output_buffer *));
static void error_recursion PARAMS ((void)) ATTRIBUTE_NORETURN;
static const char *trim_filename PARAMS ((const char *));
extern int rtl_dump_and_exit; extern int rtl_dump_and_exit;
extern int inhibit_warnings; extern int inhibit_warnings;
extern int warnings_are_errors; extern int warnings_are_errors;
...@@ -137,6 +140,10 @@ int diagnostic_message_length_per_line; ...@@ -137,6 +140,10 @@ int diagnostic_message_length_per_line;
/* Used to control every diagnostic message formatting. Front-ends should /* Used to control every diagnostic message formatting. Front-ends should
call set_message_prefixing_rule to set up their politics. */ call set_message_prefixing_rule to set up their politics. */
static int current_prefixing_rule; static int current_prefixing_rule;
/* Prevent recursion into the error handler. */
static int diagnostic_lock;
/* Initialize the diagnostic message outputting machinery. */ /* Initialize the diagnostic message outputting machinery. */
...@@ -900,20 +907,25 @@ diagnostic_for_decl (decl, msg, args_ptr, warn) ...@@ -900,20 +907,25 @@ diagnostic_for_decl (decl, msg, args_ptr, warn)
{ {
output_state os; output_state os;
if (!count_error (warn)) if (diagnostic_lock++)
return; error_recursion ();
os = diagnostic_buffer->state;
report_error_function (DECL_SOURCE_FILE (decl)); if (count_error (warn))
output_set_prefix {
(diagnostic_buffer, context_as_prefix os = diagnostic_buffer->state;
(DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl), warn)); report_error_function (DECL_SOURCE_FILE (decl));
output_buffer_ptr_to_format_args (diagnostic_buffer) = args_ptr; output_set_prefix
output_buffer_text_cursor (diagnostic_buffer) = msg; (diagnostic_buffer, context_as_prefix
format_with_decl (diagnostic_buffer, decl); (DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl), warn));
finish_diagnostic (); output_buffer_ptr_to_format_args (diagnostic_buffer) = args_ptr;
output_destroy_prefix (diagnostic_buffer); output_buffer_text_cursor (diagnostic_buffer) = msg;
format_with_decl (diagnostic_buffer, decl);
finish_diagnostic ();
output_destroy_prefix (diagnostic_buffer);
diagnostic_buffer->state = os; diagnostic_buffer->state = os;
}
diagnostic_lock--;
} }
...@@ -1254,17 +1266,6 @@ error VPARAMS ((const char *msgid, ...)) ...@@ -1254,17 +1266,6 @@ error VPARAMS ((const char *msgid, ...))
va_end (ap); va_end (ap);
} }
/* Set the function to call when a fatal error occurs. */
static void (*fatal_function) PARAMS ((const char *, va_list));
void
set_fatal_function (f)
void (*f) PARAMS ((const char *, va_list));
{
fatal_function = f;
}
/* Report a fatal error at the current line number. Allow a front end to /* Report a fatal error at the current line number. Allow a front end to
intercept the message. */ intercept the message. */
void void
...@@ -1274,18 +1275,13 @@ fatal VPARAMS ((const char *msgid, ...)) ...@@ -1274,18 +1275,13 @@ fatal VPARAMS ((const char *msgid, ...))
const char *msgid; const char *msgid;
#endif #endif
va_list ap; va_list ap;
va_list args_for_fatal_msg;
VA_START (ap, msgid); VA_START (ap, msgid);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
msgid = va_arg (ap, const char *); msgid = va_arg (ap, const char *);
#endif #endif
va_copy (args_for_fatal_msg, ap);
if (fatal_function != NULL)
(*fatal_function) (_(msgid), args_for_fatal_msg);
va_end (args_for_fatal_msg);
report_diagnostic (msgid, &ap, input_filename, lineno, 0); report_diagnostic (msgid, &ap, input_filename, lineno, 0);
va_end (ap); va_end (ap);
exit (FATAL_EXIT_CODE); exit (FATAL_EXIT_CODE);
...@@ -1482,16 +1478,77 @@ report_diagnostic (msg, args_ptr, file, line, warn) ...@@ -1482,16 +1478,77 @@ report_diagnostic (msg, args_ptr, file, line, warn)
{ {
output_state os; output_state os;
if (!count_error (warn)) if (diagnostic_lock++)
return; error_recursion ();
os = diagnostic_buffer->state;
diagnostic_msg = msg; if (count_error (warn))
diagnostic_args = args_ptr; {
report_error_function (file); os = diagnostic_buffer->state;
output_set_prefix diagnostic_msg = msg;
(diagnostic_buffer, context_as_prefix (file, line, warn)); diagnostic_args = args_ptr;
output_format (diagnostic_buffer); report_error_function (file);
finish_diagnostic (); output_set_prefix
output_destroy_prefix (diagnostic_buffer); (diagnostic_buffer, context_as_prefix (file, line, warn));
diagnostic_buffer->state = os; output_format (diagnostic_buffer);
finish_diagnostic ();
output_destroy_prefix (diagnostic_buffer);
diagnostic_buffer->state = os;
}
diagnostic_lock--;
}
/* Inform the user that an error occurred while trying to report some
other error. This indicates catastrophic internal inconsistencies,
so give up now. But do try to flush out the previous error. */
static void
error_recursion ()
{
if (diagnostic_lock < 3)
finish_diagnostic ();
fprintf (stderr,
"Internal compiler error: Error reporting routines re-entered.\n\
Please submit a full bug report.\n\
See %s for instructions.\n", GCCBUGURL);
exit (FATAL_EXIT_CODE);
}
/* Given a partial pathname as input, return another pathname that
shares no directory elements with the pathname of __FILE__. This
is used by fancy_abort() to print `Internal compiler error in expr.c'
instead of `Internal compiler error in ../../egcs/gcc/expr.c'. */
static const char *
trim_filename (name)
const char *name;
{
static const char this_file[] = __FILE__;
const char *p = name, *q = this_file;
while (*p == *q && *p != 0 && *q != 0) p++, q++;
while (p > name && p[-1] != DIR_SEPARATOR
#ifdef DIR_SEPARATOR_2
&& p[-1] != DIR_SEPARATOR_2
#endif
)
p--;
return p;
}
/* Report an internal compiler error in a friendly manner and without
dumping core. */
void
fancy_abort (file, line, function)
const char *file;
int line;
const char *function;
{
fatal (
"Internal compiler error in %s, at %s:%d\n\
Please submit a full bug report.\n\
See %s for instructions.",
function, trim_filename (file), line, GCCBUGURL);
} }
...@@ -104,3 +104,15 @@ fatal VPARAMS ((const char *format, ...)) ...@@ -104,3 +104,15 @@ fatal VPARAMS ((const char *format, ...))
fputc('\n', stderr); fputc('\n', stderr);
exit (FATAL_EXIT_CODE); exit (FATAL_EXIT_CODE);
} }
/* "Fancy" abort. Reports where in the compiler someone gave up.
This file is used only by build programs, so we're not as polite as
the version in diagnostic.c. */
void
fancy_abort (file, line, func)
const char *file;
int line;
const char *func;
{
fatal ("ICE in %s, at %s:%d", func, file, line);
}
...@@ -265,7 +265,7 @@ static void fatal_with_file_and_line PARAMS ((FILE *, const char *, ...)) ...@@ -265,7 +265,7 @@ static void fatal_with_file_and_line PARAMS ((FILE *, const char *, ...))
ATTRIBUTE_PRINTF_2 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_2 ATTRIBUTE_NORETURN;
static void fatal_expected_char PARAMS ((FILE *, int, int)) ATTRIBUTE_NORETURN; static void fatal_expected_char PARAMS ((FILE *, int, int)) ATTRIBUTE_NORETURN;
static void read_name PARAMS ((char *, FILE *)); static void read_name PARAMS ((char *, FILE *));
static const char *trim_filename PARAMS ((const char *));
/* Allocate an rtx vector of N elements. /* Allocate an rtx vector of N elements.
Store the length, and initialize all elements to zero. */ Store the length, and initialize all elements to zero. */
...@@ -1196,48 +1196,3 @@ rtvec_check_failed_bounds (r, n, file, line, func) ...@@ -1196,48 +1196,3 @@ rtvec_check_failed_bounds (r, n, file, line, func)
fancy_abort (file, line, func); fancy_abort (file, line, func);
} }
#endif /* ENABLE_RTL_CHECKING */ #endif /* ENABLE_RTL_CHECKING */
/* These are utility functions used by fatal-error functions all over the
code. rtl.c happens to be linked by all the programs that need them,
so these are here. In the future we want to break out all error handling
to its own module. */
/* Given a partial pathname as input, return another pathname that
shares no directory elements with the pathname of __FILE__. This
is used by fancy_abort() to print `Internal compiler error in expr.c'
instead of `Internal compiler error in ../../egcs/gcc/expr.c'. */
static const char *
trim_filename (name)
const char *name;
{
static const char this_file[] = __FILE__;
const char *p = name, *q = this_file;
while (*p == *q && *p != 0 && *q != 0) p++, q++;
while (p > name && p[-1] != DIR_SEPARATOR
#ifdef DIR_SEPARATOR_2
&& p[-1] != DIR_SEPARATOR_2
#endif
)
p--;
return p;
}
/* Report an internal compiler error in a friendly manner and without
dumping core. */
void
fancy_abort (file, line, function)
const char *file;
int line;
const char *function;
{
if (function == NULL)
function = "?";
fatal (
"Internal compiler error in `%s', at %s:%d\n\
Please submit a full bug report.\n\
See %s for instructions.",
function, trim_filename (file), line, GCCBUGURL);
}
...@@ -223,45 +223,40 @@ typedef struct rtvec_def{ ...@@ -223,45 +223,40 @@ typedef struct rtvec_def{
(*({ rtx _rtx = (RTX); int _n = (N); \ (*({ rtx _rtx = (RTX); int _n = (N); \
enum rtx_code _code = GET_CODE (_rtx); \ enum rtx_code _code = GET_CODE (_rtx); \
if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \ if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, \ rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, __FUNCTION__); \
__PRETTY_FUNCTION__); \
if (GET_RTX_FORMAT(_code)[_n] != C1) \ if (GET_RTX_FORMAT(_code)[_n] != C1) \
rtl_check_failed_type1 (_rtx, _n, C1, __FILE__, __LINE__, \ rtl_check_failed_type1(_rtx, _n, C1, __FILE__, __LINE__, __FUNCTION__); \
__PRETTY_FUNCTION__); \
&_rtx->fld[_n]; })) &_rtx->fld[_n]; }))
#define RTL_CHECK2(RTX, N, C1, C2) __extension__ \ #define RTL_CHECK2(RTX, N, C1, C2) __extension__ \
(*({ rtx _rtx = (RTX); int _n = (N); \ (*({ rtx _rtx = (RTX); int _n = (N); \
enum rtx_code _code = GET_CODE (_rtx); \ enum rtx_code _code = GET_CODE (_rtx); \
if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \ if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, \ rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, __FUNCTION__); \
__PRETTY_FUNCTION__); \
if (GET_RTX_FORMAT(_code)[_n] != C1 \ if (GET_RTX_FORMAT(_code)[_n] != C1 \
&& GET_RTX_FORMAT(_code)[_n] != C2) \ && GET_RTX_FORMAT(_code)[_n] != C2) \
rtl_check_failed_type2 (_rtx, _n, C1, C2, __FILE__, __LINE__, \ rtl_check_failed_type2 (_rtx, _n, C1, C2, __FILE__, __LINE__, \
__PRETTY_FUNCTION__); \ __FUNCTION__); \
&_rtx->fld[_n]; })) &_rtx->fld[_n]; }))
#define RTL_CHECKC1(RTX, N, C) __extension__ \ #define RTL_CHECKC1(RTX, N, C) __extension__ \
(*({ rtx _rtx = (RTX); int _n = (N); \ (*({ rtx _rtx = (RTX); int _n = (N); \
if (GET_CODE (_rtx) != C) \ if (GET_CODE (_rtx) != C) \
rtl_check_failed_code1 (_rtx, C, __FILE__, __LINE__, \ rtl_check_failed_code1 (_rtx, C, __FILE__, __LINE__, __FUNCTION__); \
__PRETTY_FUNCTION__); \
&_rtx->fld[_n]; })) &_rtx->fld[_n]; }))
#define RTL_CHECKC2(RTX, N, C1, C2) __extension__ \ #define RTL_CHECKC2(RTX, N, C1, C2) __extension__ \
(*({ rtx _rtx = (RTX); int _n = (N); \ (*({ rtx _rtx = (RTX); int _n = (N); \
enum rtx_code _code = GET_CODE (_rtx); \ enum rtx_code _code = GET_CODE (_rtx); \
if (_code != C1 && _code != C2) \ if (_code != C1 && _code != C2) \
rtl_check_failed_code2 (_rtx, C1, C2, __FILE__, __LINE__, \ rtl_check_failed_code2(_rtx, C1, C2, __FILE__, __LINE__, __FUNCTION__); \
__PRETTY_FUNCTION__); \
&_rtx->fld[_n]; })) &_rtx->fld[_n]; }))
#define RTVEC_ELT(RTVEC, I) __extension__ \ #define RTVEC_ELT(RTVEC, I) __extension__ \
(*({ rtvec _rtvec = (RTVEC); int _i = (I); \ (*({ rtvec _rtvec = (RTVEC); int _i = (I); \
if (_i < 0 || _i >= GET_NUM_ELEM (_rtvec)) \ if (_i < 0 || _i >= GET_NUM_ELEM (_rtvec)) \
rtvec_check_failed_bounds (_rtvec, _i, __FILE__, __LINE__, \ rtvec_check_failed_bounds (_rtvec, _i, __FILE__, __LINE__, \
__PRETTY_FUNCTION__); \ __FUNCTION__); \
&_rtvec->elem[_i]; })) &_rtvec->elem[_i]; }))
extern void rtl_check_failed_bounds PARAMS ((rtx, int, extern void rtl_check_failed_bounds PARAMS ((rtx, int,
...@@ -1809,11 +1804,7 @@ extern int read_rtx_lineno; ...@@ -1809,11 +1804,7 @@ extern int read_rtx_lineno;
extern void fancy_abort PARAMS ((const char *, int, const char *)) extern void fancy_abort PARAMS ((const char *, int, const char *))
ATTRIBUTE_NORETURN; ATTRIBUTE_NORETURN;
#if (GCC_VERSION >= 2007) #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
#define abort() fancy_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
#else
#define abort() fancy_abort (__FILE__, __LINE__, 0)
#endif
/* In alias.c */ /* In alias.c */
extern rtx canon_rtx PARAMS ((rtx)); extern rtx canon_rtx PARAMS ((rtx));
......
...@@ -615,4 +615,9 @@ extern void abort PARAMS ((void)); ...@@ -615,4 +615,9 @@ extern void abort PARAMS ((void));
extern void *alloca (__SIZE_TYPE__); extern void *alloca (__SIZE_TYPE__);
#endif #endif
/* Various error reporting routines want to use __FUNCTION__. */
#if (GCC_VERSION < 2007)
#define __FUNCTION__ "?"
#endif
#endif /* __GCC_SYSTEM_H__ */ #endif /* __GCC_SYSTEM_H__ */
...@@ -57,17 +57,11 @@ extern void _fatal_insn PARAMS ((const char *, ...@@ -57,17 +57,11 @@ extern void _fatal_insn PARAMS ((const char *,
const char *)) const char *))
ATTRIBUTE_NORETURN; ATTRIBUTE_NORETURN;
#if (GCC_VERSION >= 2007)
#define fatal_insn(msgid, insn) \ #define fatal_insn(msgid, insn) \
_fatal_insn (msgid, insn, __FILE__, __LINE__, __PRETTY_FUNCTION__) _fatal_insn (msgid, insn, __FILE__, __LINE__, __FUNCTION__)
#define fatal_insn_not_found(insn) \ #define fatal_insn_not_found(insn) \
_fatal_insn_not_found (insn, __FILE__, __LINE__, __PRETTY_FUNCTION__) _fatal_insn_not_found (insn, __FILE__, __LINE__, __FUNCTION__)
#else
#define fatal_insn(msgid, insn) \
_fatal_insn (msgid, insn, __FILE__, __LINE__, 0)
#define fatal_insn_not_found(insn) \
_fatal_insn_not_found (insn, __FILE__, __LINE__, 0)
#endif
extern void warning PARAMS ((const char *, ...)) extern void warning PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1; ATTRIBUTE_PRINTF_1;
extern void error PARAMS ((const char *, ...)) extern void error PARAMS ((const char *, ...))
...@@ -140,5 +134,4 @@ extern int sorrycount; ...@@ -140,5 +134,4 @@ extern int sorrycount;
extern const char *progname; extern const char *progname;
extern void set_fatal_function PARAMS ((void (*) (const char *, va_list)));
#endif /* __GCC_TOPLEV_H */ #endif /* __GCC_TOPLEV_H */
...@@ -4249,10 +4249,7 @@ fancy_abort (line, func) ...@@ -4249,10 +4249,7 @@ fancy_abort (line, func)
int line; int line;
const char *func; const char *func;
{ {
if (!func) fatal ("Internal error in %s, at tradcpp.c:%d\n\
func = "?";
fatal ("Internal error in \"%s\", at tradcpp.c:%d\n\
Please submit a full bug report.\n\ Please submit a full bug report.\n\
See %s for instructions.", func, line, GCCBUGURL); See %s for instructions.", func, line, GCCBUGURL);
} }
......
...@@ -281,14 +281,12 @@ struct tree_common ...@@ -281,14 +281,12 @@ struct tree_common
#define TREE_CHECK(t, code) __extension__ \ #define TREE_CHECK(t, code) __extension__ \
({ const tree __t = t; \ ({ const tree __t = t; \
if (TREE_CODE(__t) != (code)) \ if (TREE_CODE(__t) != (code)) \
tree_check_failed (__t, code, __FILE__, \ tree_check_failed (__t, code, __FILE__, __LINE__, __FUNCTION__); \
__LINE__, __PRETTY_FUNCTION__); \
__t; }) __t; })
#define TREE_CLASS_CHECK(t, class) __extension__ \ #define TREE_CLASS_CHECK(t, class) __extension__ \
({ const tree __t = t; \ ({ const tree __t = t; \
if (TREE_CODE_CLASS(TREE_CODE(__t)) != (class)) \ if (TREE_CODE_CLASS(TREE_CODE(__t)) != (class)) \
tree_class_check_failed (__t, class, __FILE__, \ tree_class_check_failed (__t, class, __FILE__, __LINE__, __FUNCTION__); \
__LINE__, __PRETTY_FUNCTION__); \
__t; }) __t; })
/* These checks have to be special cased. */ /* These checks have to be special cased. */
...@@ -296,16 +294,14 @@ struct tree_common ...@@ -296,16 +294,14 @@ struct tree_common
({ const tree __t = t; \ ({ const tree __t = t; \
enum tree_code __c = TREE_CODE(__t); \ enum tree_code __c = TREE_CODE(__t); \
if (__c != CONSTRUCTOR && TREE_CODE_CLASS(__c) != 'c') \ if (__c != CONSTRUCTOR && TREE_CODE_CLASS(__c) != 'c') \
tree_check_failed (__t, CONSTRUCTOR, __FILE__, \ tree_check_failed (__t, CONSTRUCTOR, __FILE__, __LINE__, __FUNCTION__); \
__LINE__, __PRETTY_FUNCTION__); \
__t; }) __t; })
#define EXPR_CHECK(t) __extension__ \ #define EXPR_CHECK(t) __extension__ \
({ const tree __t = t; \ ({ const tree __t = t; \
char __c = TREE_CODE_CLASS(TREE_CODE(__t)); \ char __c = TREE_CODE_CLASS(TREE_CODE(__t)); \
if (__c != 'r' && __c != 's' && __c != '<' \ if (__c != 'r' && __c != 's' && __c != '<' \
&& __c != '1' && __c != '2' && __c != 'e') \ && __c != '1' && __c != '2' && __c != 'e') \
tree_class_check_failed(__t, 'e', __FILE__, \ tree_class_check_failed(__t, 'e', __FILE__, __LINE__, __FUNCTION__); \
__LINE__, __PRETTY_FUNCTION__); \
__t; }) __t; })
extern void tree_check_failed PARAMS ((const tree, enum tree_code, extern void tree_check_failed PARAMS ((const tree, enum tree_code,
...@@ -2876,8 +2872,4 @@ extern void dwarf2out_end_epilogue PARAMS ((void)); ...@@ -2876,8 +2872,4 @@ extern void dwarf2out_end_epilogue PARAMS ((void));
extern void fancy_abort PARAMS ((const char *, int, const char *)) extern void fancy_abort PARAMS ((const char *, int, const char *))
ATTRIBUTE_NORETURN; ATTRIBUTE_NORETURN;
#if (GCC_VERSION >= 2007) #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
#define abort() fancy_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
#else
#define abort() fancy_abort (__FILE__, __LINE__, 0)
#endif
...@@ -180,8 +180,7 @@ extern void varray_check_failed PARAMS ((varray_type, size_t, ...@@ -180,8 +180,7 @@ extern void varray_check_failed PARAMS ((varray_type, size_t,
(*({ varray_type _va = VA; \ (*({ varray_type _va = VA; \
size_t _n = N; \ size_t _n = N; \
if (_n >= _va->num_elements) \ if (_n >= _va->num_elements) \
varray_check_failed (_va, _n, __FILE__, __LINE__, \ varray_check_failed (_va, _n, __FILE__, __LINE__, __FUNCTION__); \
__PRETTY_FUNCTION__); \
&_va->data.T[_n]; })) &_va->data.T[_n]; }))
#else #else
#define VARRAY_CHECK(VA, N, T) ((VA)->data.T[N]) #define VARRAY_CHECK(VA, N, T) ((VA)->data.T[N])
......
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