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: fatal error when failing to register a new pass [eg from plugin]


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.


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