This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/16579] gfortran: (ICHAR(CHAR(I)) .NE. I) when 128 <= I <= 255


------- Additional Comments From sgk at troutmask dot apl dot washington dot edu  2004-07-16 04:24 -------

The standard says that the range for I in CHAR(I) "shall be of type integer
with a value in the range [0, n - 1], where n is the number of characters
in the collating sequence associated with the specified kind type parameter."
Gfortran uses the ASCII collating sequence, which has 128 characters.  The
standard does not specify the return value of CHAR(I) when I is not in the
specified range.  So, this isn't a signed versus an unsigned problem.  It
falls under the heading "processor defined behavior".  Personally, I think
CHAR() and ICHAR() should do the appropriate range check and issues an
error for out of range values.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16579


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