This is the mail archive of the 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]

Re: [Patch, fortran] PR28585: Add Fortran 2003 NEW_LINE intrinsic function

Steve Kargl wrote:
On Thu, Sep 28, 2006 at 07:29:18AM +0200, FX Coudert wrote:
I'm a bit worried that not all systems supported by gfortran use \n as newline. E.g., i386-pc-mingw32 uses \n\r.

Yes, that is a concern. We can probably ping Richard Maine for
the requirements of the standard. Without looking, I would guess
the standard simple says that new_line() provides a single CHARACTER. On input/output the processor is permitted to translate
a \n to \r\n, but new_line() itself must return \n.

I had thought about suggesting such a translation on input/output, but unfortunately there are probably lots of programs in existence that assume that \n is not translated to \r\n, and so that would really be a regression.

My conclusion is that the standard NEW_LINE intrinsic is relatively useless, as a result of this; it simply is not defined as a function that reliably returns the system representation of a new line.

- Brooks

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