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]

Re: ICE overhaul - back end and C front end


On Thu, Aug 19, 1999 at 11:30:28PM -0700, Zack Weinberg wrote:
> +/* Redefine abort to report an internal error w/o coredump, and
> +   reporting the location of the error in the source file.  This logic
> +   is duplicated in rtl.h and tree.h because every file that needs the
> +   special abort includes one or both.  toplev.h gets too few files,
> +   system.h gets too many.  */
> +
> +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
> +extern void fancy_abort PROTO((const char *, int)) ATTRIBUTE_NORETURN;
> +#define abort() fancy_abort (__FILE__, __LINE__)
> +#else
> +extern void fancy_abort PROTO((const char *, int, const char *))
> +    ATTRIBUTE_NORETURN;
> +#define abort() fancy_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
> +#endif

I don't like the amount of ifdeffing here and elsewhere you go through
to avoid passing a NULL third argument to fancy_abort et al.

Otherwise, I think this is ok.


r~


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