Non-optimal error message for unsupported character kind

Non-optimal error message for unsupported character kind

Imagen de Harald

Hello,

the compiler's error message could by more helpful for the following example:

  integer, parameter :: iso  = SELECTED_CHAR_KIND ("ISO_10646") ! unsupported
  character(kind=iso) , parameter :: c = CHAR (32,KIND=iso)
  print *, 'selected_char_kind ("ISO_10646") =', iso
end

ifort 13.0 produces:

ifort_character_kinds.f90(2): error #6684: This is an incorrect value for a kind type parameter in this context.   [ISO]
  character(kind=iso) , parameter :: c = CHAR (32,KIND=iso)
-----------------^
ifort_character_kinds.f90(2): error #6684: This is an incorrect value for a kind type parameter in this context.
  character(kind=iso) , parameter :: c = CHAR (32,KIND=iso)
-------------------------------------------------------^
compilation aborted for ifort_character_kinds.f90 (code 1)

Commenting out the offending line 2 and running the program shows that

the encoding is not supported and thus iso==-1.  It would be helpful if the error message

would quote the actual invalid value.

Regards,

Harald

publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de HeinzB (Intel)

Hi Harald
yes - agree. This should be reported in a better way. I will submit file a case to improve the message.
Heinz

Imagen de HeinzB (Intel)

For tracking purpose: Submitted as case DPD200236373

I will inform you here as soon as this gets implemented.

Inicie sesión para dejar un comentario.