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] Towards wide character strings, step 2: handle characeter constants as wide strings


OK to commit?
OK.

Thanks.


On has then also decide whether on allows, e.g.
character(selected_char_kind('ISO_10646')) :: a = 'x'
I think this is not standard conform since 'x' has the default encoding whereas a is UCS-4.

Well, how is that different from:


integer(kind=8) :: i = 42_4

which is legal? The standard explains that you can assign ISO 10646, ASCII, or default character exprs to ISO 10646, ASCII, or default character variables (7.4.1.2 in F2003).

Simply print an error for non-ascii Hollerits. Hollerit constants were deleted from F77 and Hollerit edit descriptors were deleted from Fortran 95. I think there exists no program which uses non- ascii characters for Hollerits. Before Fortran 77 I think there was no one thinking of non-ascii characters and after Fortran 77 no one should have used Hollerit constants anymore. (If creating an error is too difficult, one could also simply place a note in the Hollerit section of gfortran.tex.)

Fine for me :) I'll go for the error, it should be rather simple.


PS: The following program now causes an ICE (with -fbackslash):

module m
 character(*), parameter ::  a ='H\0z'
end module m

use m
print *, a  ! ICE
end

! ICE: in gfc_widechar_to_char, at fortran/scanner.c:202

According to the gfortran documentation one has 'H', '\0' and 'z'. There is no wide character involved.

Agreed that it's how it should behave. I'm on it!


Thanks again,
FX

--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/


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