fatal error when failing to register a new pass [eg from plugin]

Richard Guenther rguenther@suse.de
Tue Oct 13 13:57:00 GMT 2009


On Tue, 13 Oct 2009, Diego Novillo wrote:

> On Tue, Oct 13, 2009 at 02:41, Basile STARYNKEVITCH
> <basile@starynkevitch.net> wrote:
> 
> > Index: gcc/passes.c
> > ===================================================================
> > --- gcc/passes.c	(revision 152697)
> > +++ gcc/passes.c	(working copy)
> > @@ -601,14 +601,14 @@ void
> >  register_pass (struct register_pass_info *pass_info)
> >  {
> >    if (!pass_info->pass)
> > -    {
> > -      gcc_unreachable ();
> > -    }
> > +      fatal_error ("can%'t register a null pass");
> 
> s/can%'t/cannot/ everywhere.
> 
> I prefer the fatal_errors to gcc_unreachable in this case.
> Richard, do you have any strong preference to keeping the
> gcc_unreachables here?

No.  But "cannot register a null pass" isn't very informative
either, nor is it obvious to translators what to do here.

Richard.



More information about the Gcc-patches mailing list