This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH] Fix formatting of the -fdec-math changes
On Tue, Oct 11, 2016 at 03:15:24PM -0400, Fritz Reese wrote:
> > --- gcc/fortran/simplify.c.jj 2016-10-11 20:51:01.767308095 +0200
> > +++ gcc/fortran/simplify.c 2016-10-11 20:56:27.468199551 +0200
> > @@ -1717,27 +1717,24 @@ simplify_trig_call (gfc_expr *icall)
> >
> > /* The actual simplifiers will return NULL for non-constant x. */
> > switch (func)
> > - {
> > + {
> ...
> > default:
> > - break;
> > - }
> > -
> > - gfc_internal_error ("in simplify_trig_call(): Bad intrinsic");
> > - return NULL;
> > + gfc_internal_error ("in simplify_trig_call(): Bad intrinsic");
> > + }
> > }
> >
>
> I only had a 'return NULL' so no compiler could complain that
> "simplify_trig_call might not return a value". Your way is okay too if
> it works.
gfc_internal_error is marked __attribute__((noreturn)), so gcc should not
warn. And, for other compilers we generally ignore warnings.
Jakub