[patch, fortran] PR37159 - add size check for random_seed(get)

Daniel Franke franke.daniel@gmail.com
Wed Dec 10 12:19:00 GMT 2008


On Wednesday 10 December 2008 11:57:25 Tobias Burnus wrote:
> Why are you changing the error message:
>
> -	gfc_error ("Array PUT of intrinsic %s is too small (%i/%i) at %L",
> -		   gfc_current_intrinsic, (int) mpz_get_ui (put_size),
> -		   kiss_size, where);
> +	gfc_error ("Size of '%s' argument of '%s' intrinsic at %L "
> +		   "too small (%i/%i)",
> +		   gfc_current_intrinsic_arg[1], gfc_current_intrinsic, where,
> +		   (int) mpz_get_ui (put_size), kiss_size);
>
>
> Reading the source it is much easier to have "PUT" than %s ....
> gfc_current_intrinsic_arg[1]. For the translation it probably does not
> matter that much, but for choosing the right article having there an
> actual word rather than %s might be an advantage for the translator. (On
> the other hand, %s means reduces the number of strings to be translated
> by one).
>
> Thus, if there is a compelling reason, leave it as is, but otherwise I
> prefer PUT and GET to %s and especially to "gfc_current_intrinsic_arg[1]".

To match the prevalent pattern of messages. If one browses check.c, most (not 
all) messages are built as "'%s' argument of '%s' intrinsic at %L [...]".

I don't feel too strong about it, I wouldn't mind to revert this change.

	Daniel



More information about the Gcc-patches mailing list