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.
Could you maybe use something like
+ gfc_error ("Rank remapping requires "
+ lower and upper bounds at %L",
&lvalue->where);
and possibly, instead of
- gfc_error ("Either all or none of the upper bounds"
- " must be specified at %L", &lvalue->where);
+ gfc_error ("Rank remapping requires a "
+ BOUNDS_SPEC_LIST " at %L",
+ &lvalue->where);
return false;
use
" Rank remapping requires that all lower and upper bounds be specified"
?
(And I am fairly certain that my versions are not the best possible
ones...)
So, either something like what you propsed (but without the #defines)
or something like what I wrote above would be OK.
Regards
Thomas