This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [fortran,patch] Add SELECTED_CHAR_KIND intrinsic


Hello FX,

FX wrote:
> PS: Jerry, what's the status of ENCODING="..." I/O specifier? Can we
> already claim that we support Fortran 2003 international character sets
> (the requirements for that are fairly low, as quite a few compilers have
> a "yes" in that column and I know none that actually supports any
> nondefault character kind).

I think with that patch we support about as much as other compilers, but
still I would only claim PARTIAL, following NAG f95 which also has only
ASCII support. Actually, the library implementation has a diagnostic
bug. The following should give a run-time error (the compile-time diagnostic
is OK):

character(len=10) :: cc = 'UTF-8'
open(99,file="dd",encoding=cc)
write(*,*) 'HELLO'
end


The patch is OK, however, it took me a while to correctly read:

  +  len = (alen > blen) ? alen : blen;

I somehow read:   len = MIN(alen,blen)  instead of  MAX(...)

I therefore wonder whether one should add a comment somewhere.

Tobias

> gcc/fortran/ChangeLog
> 
> 2008-04-30  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
>
> 	* intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]