[Patch, fortran] PR19262 more than thirty-nine continuation lines should issue a std-warn
Jerry DeLisle
jvdelisle@verizon.net
Sat Sep 23 06:14:00 GMT 2006
:ADDPATCH fortran:
The attach patch modifies scanner.c to keep track of the number of continuation
lines in a statement. The F95 standard 3.3.1.4 says the number shall not exceed
39. F2003 changes this to 255. I have set the limit to default to 255. If
-pedantic is given, it is set to 39. If the limit is exceeded an error is issued.
I chose an error rather than warn because the standard states "shall not". If
others feel strongly that should be a warn, I can easily change.
Regression tested. OK for trunk?
(The attached patch includes the patch for pr19260 since it is in the same
function. I can commit them together.)
Regards
Jerry
2006-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/19262
* scanner.c (gfc_scanner_init_1): Initialize continuation line count
and set the line count limit.
(gfc_next_char_literal): Count the number of continuation lines in the
current statement and error if limit is exceeded.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr19262.diff
Type: text/x-patch
Size: 3348 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060923/c9171a37/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: continuation_3.f90
Type: text/x-fortran
Size: 1921 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060923/c9171a37/attachment-0001.bin>
More information about the Fortran
mailing list