[Patch, fortran] PR19262 more than thirty-nine continuation lines should issue a std-warn

Brooks Moses bmoses@stanford.edu
Sat Sep 23 06:30:00 GMT 2006


Jerry DeLisle wrote:
> :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.

I don't feel strongly about it, but I do think it should probably be a 
warning at least when strict standard compliance is not requested; 
extending the number is a relatively common extension.

Also, -std=f95 ought set the limit to 39, as well.  I would suggest 
using that rather than -pedantic in the test case because at some point 
(hopefully not a double-digit number of years in the future!) -pedantic 
will be pedantically enforcing f2003 compliance.  :)

- Brooks



More information about the Fortran mailing list