This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Avoid gcc_assert in libgcov


> 
> In that case should we call gcov_error when IN_LIBGCOV? One
> possibility would be to simply make gcov_nonruntime_assert be defined
> as if (!EXPR) gcov_error in the IN_LIBGCOV case. But I think what you
> wanted here was to reduce libgcov bloat by removing calls altogether,
> which this wouldn't solve. But if we want to call gcov_error in some
> cases, I think I need to add another macro that will either do
> gcc_assert when !IN_LIBGCOV and "if (!EXPR) gcov_error" when
> IN_LIBGCOV. Is that what you had in mind?

I think for errors that can be triggered by data corruption, we ought to
produce resonable error messages in both IN_LIBGCOV or for offline tools.
Just unwound sequence if(...) gcov_error seems fine to me in this case,
but we may also have assert like wrapper.
I see we do not provide gcov_error outside libgcov, we probably ought to map
it to fatal_error in GCC binary.

thanks,
Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]