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

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


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

How about:
* default and -std=f2003: 255 (free form)
* -std=f90 and -std=f95: 39 (free form)
* -std=f2003: 255 (fixed form)
* -std=f77, -std=f90, -std=f95: 19 (fixed form)
* default (fixed form): 19 ?

I don't see what it has to do with -pedantic.

If you go for an error (and maybe also otherwise), could you add an
option like -maxcontin=N. At least for fixed-form code one easily
exceeds the 19 lines, even if one wants to compile with the -std=* option.

Tobias


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