* Makefile.in (BUILD_ERRORS): Set to build-errors.
(errors.o): New target for host.
(build-errors.o): New target for build.
(genobjs): Replace errors.o with build-errors.
(gengenrtl$(buildexeext)): Add $(BUILD_ERRORS).
(GCOV_OBJS, GCOV_DUMP_OBJS): Add errors.o.
(fix-headers$(build_exeext)): Add $(BUILD_ERRORS).
(fix-header.o): Add errors.h
* collect2.c (fancy_abort): Add parameters.
* collect2.h (fancy_abort): Don't declare.
* errors.h (fancy_abort): Don't declare.
* errors.c: Include either bconfig.h or config.h.
(fancy_abort): Trim filename.
* fix-header.c (v_fatal, fatal): Remove.
(progname): Remove definition.
(main): Set progname here.
* gcc.c (fancy_abort): Add parameters.
* gcc.h (fancy_abort): Remove declaration.
* gcov.c (fancy_abort): Remove.
* rtl.h (fancy_abort): Don't declare.
(abort): Don't define.
* tree.h (fancy_abort): Don't declare.
(abort): Don't define.
* system.h (fancy_abort): Declare.
(abort): Define to fancy_abort.
* fixinc/Makefile.in (ALLOBJ): Add ../build-errors.o
* java/jv-scan.c (fancy_abort): Add.
From-SVN: r86424
2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
+ * Makefile.in (BUILD_ERRORS): Set to build-errors.
+ (errors.o): New target for host.
+ (build-errors.o): New target for build.
+ (genobjs): Replace errors.o with build-errors.
+ (gengenrtl$(buildexeext)): Add $(BUILD_ERRORS).
+ (GCOV_OBJS, GCOV_DUMP_OBJS): Add errors.o.
+ (fix-headers$(build_exeext)): Add $(BUILD_ERRORS).
+ (fix-header.o): Add errors.h
+ * collect2.c (fancy_abort): Add parameters.
+ * collect2.h (fancy_abort): Don't declare.
+ * errors.h (fancy_abort): Don't declare.
+ * errors.c: Include either bconfig.h or config.h.
+ (fancy_abort): Trim filename.
+ * fix-header.c (v_fatal, fatal): Remove.
+ (progname): Remove definition.
+ (main): Set progname here.
+ * gcc.c (fancy_abort): Add parameters.
+ * gcc.h (fancy_abort): Remove declaration.
+ * gcov.c (fancy_abort): Remove.
+ * rtl.h (fancy_abort): Don't declare.
+ (abort): Don't define.
+ * tree.h (fancy_abort): Don't declare.
+ (abort): Don't define.
+ * system.h (fancy_abort): Declare.
+ (abort): Define to fancy_abort.
+ * fixinc/Makefile.in (ALLOBJ): Add ../build-errors.o
+
* tree.h (enum size_type_kind): Remove USIZETYPE, UBITSIZETYPE.
(usize_type, ubitsizetype): Remove.
* stor-layout.c (set_sizetype): Don't initialize usizetype,
* config/i386/xmmintrin.h: Include <mm_malloc.h>.
2004-08-03 H.J. Lu <hongjiu.lu@intel.com>
- Tanguy Fautrà <tfautre@pandora.be>
+ Tanguy FautrÃ\83 <tfautre@pandora.be>
* config/i386/pmm_malloc.h: New file.
BUILD_EARLY_SUPPORT = gensupport.o dummy-conditions.o
BUILD_PRINT = build-print-rtl.o
-BUILD_ERRORS = errors.o
+BUILD_ERRORS = build-errors.o
BUILD_VARRAY = build-varray.o
# Specify the directories to be searched for header files.
params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(PARAMS_H) toplev.h
hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
pretty-print.o: $(CONFIG_H) $(SYSTEM_H) pretty-print.c $(PRETTY_PRINT_H)
+errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h
$(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) $(GGC_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
genobjs=$(genprognames:%=%.o) read-rtl.o gensupport.o genattrtab.o \
genautomata.o gengenrtl.o genmodes.o genpreds.o gengtype.o \
genconstants.o gen-protos.o scan.o fix-header.o scan-decls.o \
- gencheck.o dummy-conditions.o genconditions.o errors.o ggc-none.o \
- min-insn-modes.o build-rtl.o build-print-rtl.o build-varray.o
+ gencheck.o dummy-conditions.o genconditions.o build-errors.o \
+ ggc-none.o min-insn-modes.o build-rtl.o build-print-rtl.o \
+ build-varray.o
$(genprogs): %$(build_exeext): %.o $(BUILD_RTL) $(BUILD_SUPPORT) \
$(BUILD_PRINT) $(BUILD_ERRORS) \
genoutput.o : genoutput.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h
-gengenrtl$(build_exeext) : gengenrtl.o $(BUILD_LIBDEPS)
+gengenrtl$(build_exeext) : gengenrtl.o $(BUILD_ERRORS) $(BUILD_LIBDEPS)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ \
- gengenrtl.o $(BUILD_LIBS)
+ gengenrtl.o $(BUILD_ERRORS) $(BUILD_LIBS)
gengenrtl.o : gengenrtl.c $(BCONFIG_H) $(SYSTEM_H) rtl.def
genconditions.o : genconditions.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h
-errors.o : errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
+build-errors.o : errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
ggc-none.o : ggc-none.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H)
min-insn-modes.o : min-insn-modes.c $(BCONFIG_H) system.h $(MACHMODE_H)
build-rtl.o: rtl.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) $(RTL_H) \
gcov.o: gcov.c gcov-io.h gcov-io.c gcov-iov.h intl.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
gcov-dump.o: gcov-dump.c gcov-io.h gcov-io.c gcov-iov.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
-# Only one of 'gcov' or 'gcov.exe' is actually built, depending
-# upon whether $(exeext) is empty or not.
-GCOV_OBJS = gcov.o intl.o version.o
+GCOV_OBJS = gcov.o intl.o version.o errors.o
gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@
-GCOV_DUMP_OBJS = gcov-dump.o version.o
+GCOV_DUMP_OBJS = gcov-dump.o version.o errors.o
gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) $(GCOV_DUMP_OBJS) $(LIBS) -o $@
#\f
# This is nominally a 'build' program, but it's run only when host==build,
# so we can (indeed, must) use $(LIBDEPS) and $(LIBS).
fix-header$(build_exeext): fix-header.o scan-decls.o scan.o xsys-protos.h \
- c-incpath.o cppdefault.o prefix.o $(LIBDEPS)
+ c-incpath.o cppdefault.o prefix.o $(BUILD_ERRORS) $(LIBDEPS)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ fix-header.o \
- c-incpath.o cppdefault.o scan-decls.o prefix.o scan.o $(LIBS)
+ c-incpath.o cppdefault.o scan-decls.o prefix.o scan.o \
+ $(BUILD_ERRORS) $(LIBS)
-fix-header.o: fix-header.c $(OBSTACK_H) scan.h \
+fix-header.o: fix-header.c $(OBSTACK_H) scan.h errors.h \
xsys-protos.h $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) $(CPPLIB_H)
scan-decls.o: scan-decls.c scan.h $(CPPLIB_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H)
provide a default entry. */
void
-fancy_abort (void)
+fancy_abort (const char *file, int line, const char *func)
{
- fatal ("internal error");
+ fatal ("internal gcc abort in %s, at %s:%d", func, file, line);
}
\f
static void
extern char *temporary_firstobj;
extern int vflag, debug;
-extern void fancy_abort (void) ATTRIBUTE_NORETURN;
extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
in the generator programs; the compiler has a more elaborate suite
of diagnostic printers, found in diagnostic.c. */
+#ifdef GENERATOR_FILE
#include "bconfig.h"
+#else
+#include "config.h"
+#endif
#include "system.h"
#include "errors.h"
void
fancy_abort (const char *file, int line, const char *func)
{
- internal_error ("abort in %s, at %s:%d", func, file, line);
+ internal_error ("abort in %s, at %s:%d", func, trim_filename (file), line);
}
extern void fatal (const char *, ...) ATTRIBUTE_NORETURN;
extern void internal_error (const char *, ...) ATTRIBUTE_NORETURN;
extern const char *trim_filename (const char *);
-extern void fancy_abort (const char *, int, const char *)
- ATTRIBUTE_NORETURN;
extern int have_error;
extern const char *progname;
#include "scan.h"
#include "cpplib.h"
#include "c-incpath.h"
-
-static void v_fatal (const char *, va_list)
- ATTRIBUTE_PRINTF (1,0) ATTRIBUTE_NORETURN;
-static void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+#include "errors.h"
#ifdef TARGET_EXTRA_INCLUDES
static void hook_void_int(int u ATTRIBUTE_UNUSED) { }
char *inc_filename;
int inc_filename_length;
-const char *progname = "fix-header";
FILE *outf;
sstring line;
long int inf_size;
struct symbol_list *cur_symbols;
+ progname = "fix-header";
if (argv[0] && argv[0][0])
{
char *p;
return 0;
}
-\f
-
-static void
-v_fatal (const char *str, va_list ap)
-{
- fprintf (stderr, "%s: %s: ", progname, inc_filename);
- vfprintf (stderr, str, ap);
- fprintf (stderr, "\n");
-
- exit (FATAL_EXIT_CODE);
-}
-
-static void
-fatal (const char *str, ...)
-{
- va_list ap;
-
- va_start (ap, str);
- v_fatal (str, ap);
- va_end (ap);
-}
LIBERTY = ../../libiberty/libiberty.a
ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
- fixlib.o
+ fixlib.o ../build-errors.o
TESTOBJ = fixincl.o fixlib.o fixtests.o
FIXOBJ = fixfixes.o fixlib.o
/* Output an error message and exit. */
void
-fancy_abort (void)
+fancy_abort (const char *file, int line, const char *func)
{
- fatal ("internal gcc abort");
+ fatal ("internal gcc abort in %s, at %s:%d", func, file, line);
}
\f
/* Output an error message and exit. */
/* These are exported by gcc.c. */
extern int do_spec (const char *);
extern void record_temp_file (const char *, int, int);
-extern void fancy_abort (void) ATTRIBUTE_NORETURN;
extern void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
vfprintf (file, _(msgid), ap);
va_end (ap);
}
-
-/* More 'friendly' abort that prints the line and file.
- config.h can #define abort fancy_abort if you like that sort of thing. */
-extern void fancy_abort (void) ATTRIBUTE_NORETURN;
-
-void
-fancy_abort (void)
-{
- fnotice (stderr, "Internal gcov abort.\n");
- exit (FATAL_EXIT_CODE);
-}
\f
/* Print a usage message and exit. If ERROR_P is nonzero, this is an error,
otherwise the output of --help. */
+2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
+
+ * jv-scan.c (fancy_abort): Add.
+
2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
* expr.c (build_java_arrayaccess): Use convert to change
properly initialize `finished_label'. Don't emit gotos for empty
try statements.
-2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
+2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* except.c (emit_handlers): Clear catch_clauses_last.
fputc ('\n', stderr);
va_end (ap);
}
+
+void
+fancy_abort (const char *file, int line, const char *func)
+{
+ fatal_error ("abort in %s, at %s:%d", func, file, line);
+}
extern const char *read_rtx_filename;
extern int read_rtx_lineno;
-/* Redefine abort to report an internal error w/o coredump, and
- reporting the location of the error in the source file. This logic
- is duplicated in rtl.h and tree.h because every file that needs the
- special abort includes one or both. toplev.h gets too few files,
- system.h gets too many. */
-
-extern void fancy_abort (const char *, int, const char *)
- ATTRIBUTE_NORETURN;
-#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
-
/* In alias.c */
extern void clear_reg_alias_info (rtx);
extern rtx canon_rtx (rtx);
#define __builtin_expect(a, b) (a)
#endif
+/* Redefine abort to report an internal error w/o coredump, and
+ reporting the location of the error in the source file. */
+extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
+#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
+
/* Provide a fake boolean type. We make no attempt to use the
C99 _Bool, as it may not be available in the bootstrap compiler,
and even if it is, it is liable to be buggy.
extern void set_decl_rtl (tree, rtx);
extern void set_decl_incoming_rtl (tree, rtx);
\f
-/* Redefine abort to report an internal error w/o coredump, and
- reporting the location of the error in the source file. This logic
- is duplicated in rtl.h and tree.h because every file that needs the
- special abort includes one or both. toplev.h gets too few files,
- system.h gets too many. */
-
-extern void fancy_abort (const char *, int, const char *)
- ATTRIBUTE_NORETURN;
-#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
-
/* Enum and arrays used for tree allocation stats.
Keep in sync with tree.c:tree_node_kind_names. */
typedef enum