This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran,patch] Internationalisation of the Fortran front-end
François-Xavier Coudert <fxcoudert@gmail.com> writes:
| > | gfc_error ("Expected array subscript at %C") is marked as c-format,
| > | because %C is a valid printf-style format; in fact, it is used here in
| > | gfortran internal format to represent the current locus.
| >
| > Passing locus around is specified with %H.
|
| gfortran doesn't use locus in the same sense that other front-end
| routines.
that is a bug.
| An example of error message is:
|
| In file a.f:1
|
| write(w=10)
| 1
| Error: Syntax error in WRITE statement at (1)
Maybe it is time to remind again that front-ends are encouraged to use
the common diagnostic infrastructrure, in particular the diagnostic
format specifiers and such. For example, the above should have been
write(w=10)
1
error: syntax error in WRITE statement at (1)
with no capital. You get that for free.
| which is caused by gfc_error("Syntax error in WRITE statement at %C").
|
| > You'd need to combine both styles into a single one, passing the locus
| > explicitly and using the %H format specifier.
|
| So I guess this part is not relevant.
If you decide not to play by the rules, then you'll find yourself
often in similar situations.
|
| Thanks,
| FX
--
Gabriel Dos Reis
gdr@integrable-solutions.net