type precisions made by cpplib. */
test--;
if (test < 1)
- cpp_error (pfile, DL_FATAL, "cppchar_t must be an unsigned type");
+ cpp_error (pfile, DL_ICE, "cppchar_t must be an unsigned type");
if (CPP_OPTION (pfile, precision) > BITS_PER_HOST_WIDEST_INT)
- cpp_error (pfile, DL_FATAL,
+ cpp_error (pfile, DL_ICE,
"preprocessor arithmetic has maximum precision of %lu bits; target requires %lu bits",
(unsigned long)BITS_PER_HOST_WIDEST_INT,
(unsigned long)CPP_OPTION (pfile, precision));
if (CPP_OPTION (pfile, precision) < CPP_OPTION (pfile, int_precision))
- cpp_error (pfile, DL_FATAL,
+ cpp_error (pfile, DL_ICE,
"CPP arithmetic must be at least as precise as a target int");
if (CPP_OPTION (pfile, char_precision) < 8)
- cpp_error (pfile, DL_FATAL, "target char is less than 8 bits wide");
+ cpp_error (pfile, DL_ICE, "target char is less than 8 bits wide");
if (CPP_OPTION (pfile, wchar_precision) < CPP_OPTION (pfile, char_precision))
- cpp_error (pfile, DL_FATAL,
+ cpp_error (pfile, DL_ICE,
"target wchar_t is narrower than target char");
if (CPP_OPTION (pfile, int_precision) < CPP_OPTION (pfile, char_precision))
- cpp_error (pfile, DL_FATAL,
+ cpp_error (pfile, DL_ICE,
"target int is narrower than target char");
if (CPP_OPTION (pfile, wchar_precision) > BITS_PER_CPPCHAR_T)
- cpp_error (pfile, DL_FATAL,
+ cpp_error (pfile, DL_ICE,
"CPP on this host cannot handle wide character constants over %lu bits, but the target requires %lu bits",
(unsigned long)BITS_PER_CPPCHAR_T,
(unsigned long)CPP_OPTION (pfile, wchar_precision));
if (deps_stream != stdout)
{
if (ferror (deps_stream) || fclose (deps_stream) != 0)
- cpp_error (pfile, DL_FATAL, "I/O error on output");
+ cpp_error (pfile, DL_ERROR, "I/O error on output");
}
}
else if (CPP_OPTION (pfile, out_fname) == NULL)
CPP_OPTION (pfile, out_fname) = argv[i];
else
- cpp_error (pfile, DL_FATAL,
+ cpp_error (pfile, DL_ERROR,
"too many filenames. Type %s --help for usage info",
progname);
}
arg = argv[++i];
if (!arg)
{
- cpp_error (pfile, DL_FATAL,
+ cpp_error (pfile, DL_ERROR,
cl_options[opt_index].msg, argv[i - 1]);
return argc;
}
CPP_OPTION (pfile, out_fname) = arg;
else
{
- cpp_error (pfile, DL_FATAL, "output filename specified twice");
+ cpp_error (pfile, DL_ERROR, "output filename specified twice");
return argc;
}
break;
}
else
{
- cpp_error (pfile, DL_FATAL, "-I- specified twice");
+ cpp_error (pfile, DL_ERROR, "-I- specified twice");
return argc;
}
}
(CPP_OPTION (pfile, print_deps_missing_files)
|| CPP_OPTION (pfile, deps_file)
|| CPP_OPTION (pfile, deps_phony_targets)))
- cpp_error (pfile, DL_FATAL,
+ cpp_error (pfile, DL_ERROR,
"you must additionally specify either -M or -MM");
}
void (*register_builtins) PARAMS ((cpp_reader *));
};
-#define CPP_FATAL_LIMIT 1000
-/* True if we have seen a "fatal" error. */
-#define CPP_FATAL_ERRORS(PFILE) (cpp_errors (PFILE) >= CPP_FATAL_LIMIT)
-
/* Name under which this program was invoked. */
extern const char *progname;
#define DL_PEDWARN 0x02
/* An error. */
#define DL_ERROR 0x03
-/* A fatal error. We do not exit, to support use of cpplib as a
- library, but may only return CPP_EOF tokens thereon. It is the
- caller's responsibility to check CPP_FATAL_ERRORS. */
-#define DL_FATAL 0x04
/* An internal consistency check failed. Prints "internal error: ",
- otherwise the same as DL_FATAL. */
-#define DL_ICE 0x05
+ otherwise the same as DL_ERROR. */
+#define DL_ICE 0x04
/* Extracts a diagnostic level from an int. */
#define DL_EXTRACT(l) (l & 0xf)
/* Non-zero if a diagnostic level is one of the warnings. */