This is the mail archive of the
mailing list for the GCC project.
Re: Error reporting functions
On Thu, Oct 4, 2012 at 5:21 PM, Iyer, Balaji V <firstname.lastname@example.org> wrote:
> This question is mainly for some future submission. Am I allowed to use "fatal_error (..)"? Mainly, I want to use it in cases where I want to say "if this error has occurred, I see no reason to go forward with compilation."
You are allowed to use it in exceptional circumstances. Not normally
"I see no reason to go forward" but "I can not go forward because some
critical operation has failed." There is also internal_error for,
well, internal errors; use that for data corruption. And gcc_assert
and gcc_unreachable for things that can not happen.