This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PR fortran/60091, patch] - Misleading error messages in rank-2 pointer assignment to rank-1 target
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: Harald Anlauf <anlauf at gmx dot de>, "Dominique d'Humières" <dominiq at tournesol dot lps dot ens dot fr>, gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Mar 2019 17:35:14 -0700
- Subject: Re: [PR fortran/60091, patch] - Misleading error messages in rank-2 pointer assignment to rank-1 target
- References: <A6C28E30-0EA8-4F5A-93FD-7F5E7F9D7895@lps.ens.fr> <5C86BECF.50409@gmx.de> <ee6b1d84-3c63-16e3-cc6b-1d98cb5a57ae@netcologne.de>
- Reply-to: sgk at troutmask dot apl dot washington dot edu
On Tue, Mar 12, 2019 at 11:19:07PM +0100, Thomas Koenig wrote:
> Hi Harald,
>
> > how about the attached version? It is quite verbose and produces
> > messages like
> >
> > Error: Expected list of 'lower-bound-expr:' or list of
> > 'lower-bound-expr:upper-bound-expr' at (1)
>
> I think this way of specifying error messages
>
> +#define BOUNDS_SPEC_LIST "list of %<lower-bound-expr:upper-bound-expr%>"
>
> ...
>
> + gfc_error ("Rank remapping requires a "
> + BOUNDS_SPEC_LIST " at %L",
> &lvalue->where);
>
> will cause trouble in translation of the error messages.
>
I agree with Thomas here. We should try to make the
translation of error message as painless as possible.
--
Steve