On Mon, Oct 21, 2019 at 03:40:27PM +0100, Mark Eggleston wrote:
> This is an extension to support a legacy feature supported by other
> compilers such as flang and the sun compiler. As I understand it this
> feature is associated with DEC so it enabled using
> -fdec-char-conversions and by -fdec.
>
Without this patch, the following code
% cat a.f90
integer(4) a
a = '1234'
print *, a
end
produces an error
% gfcx -c a.f90
a.f90:2:6:
2 | a = '1234'
| 1
Error: Cannot convert CHARACTER(4) to INTEGER(4) at (1)
With the new option or -fdec, I would hope/expect ar
warning would be issued, which can only be suppressed
by -w, e.g.,
% gfcx -c -fdec a.f90
a.f90:2:6:
2 | a = '1234'
| 1
Warning: Nonstandard conversion of CHARACTER(4) to INTEGER(4) at (1)
This hopefully will encourage people to fix their codes.
--
Steve