[patch, fortran] warnings on truncated lines with \r\n line-endings
Daniel Franke
franke.daniel@gmail.com
Wed Feb 18 16:26:00 GMT 2009
There's an issue with lines of maximum length and different line-endings:
1. '\n':
$> cat truncwarn.f
print *, 'long text that stops at column 72......................'
end
$> file truncwarn.f
truncwarn.f: ASCII text
$> gfortran-svn -Wall -W truncwarn.f
[no warning]
2. '\r\n'
$> unix2dos truncwarn.f
unix2dos: converting file truncwarn.f to DOS format ...
$> file truncwarn.f
truncwarn.f: ASCII text, with CRLF line terminators
$> gfortran-svn -Wall -W truncwarn.f
truncwarn.f:1.72:
print *, 'long text that stops at column 72......................'
1
Warning: Line truncated at (1)
Attached mini-patch fixes this by skipping the '\r' character without
setting 'trunc_flag'.
I'd claim it's obvious for 4.5, but would it be ok for 4.4 as well?
Regards
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: truncwarn.diff
Type: text/x-diff
Size: 348 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090218/acebadfd/attachment.bin>
More information about the Gcc-patches
mailing list