Error reporting functions

Ian Lance Taylor iant@google.com
Fri Oct 5 03:51:00 GMT 2012


On Thu, Oct 4, 2012 at 5:21 PM, Iyer, Balaji V <balaji.v.iyer@intel.com> 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.

Ian



More information about the Gcc mailing list