/* Basic error reporting routines.
- Copyright (C) 1999, 2000, 2001, 2003
+ Copyright (C) 1999, 2000, 2001, 2003, 2004
Free Software Foundation, Inc.
This file is part of GCC.
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. */
+ 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 "coretypes.h"
-#include "tm.h"
#include "errors.h"
/* Set this to argv[0] at the beginning of main. */
p++, q++;
/* Now go backwards until the previous directory separator. */
- while (p > name && p[-1] != DIR_SEPARATOR
-#ifdef DIR_SEPARATOR_2
- && p[-1] != DIR_SEPARATOR_2
-#endif
- )
+ while (p > name && !IS_DIR_SEPARATOR (p[-1]))
p--;
return p;
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);
}