[Patch, fortran] PR19260 & not required when splitting a token in continuation

Jerry DeLisle jvdelisle@verizon.net
Wed Sep 20 02:41:00 GMT 2006


:ADDPATCH fortran:

The attached patch improves handling of continuations.

i) It is not perfect.  In the case of splitting tokens, it will allow the 
matchers to flag an error for all cases except where the token continues on the 
first character of the next line.  I have not figured out how to test for that yet.

ii) I don't set -Wampersand if -pedantic so that a whole bunch of code does not 
give a warning when the '&' is missing on the continued line.  When -Wall or 
-Wampersand are set, all cases of missing '&' are flagged with a warning.

Regression tested.  Modified test continuation.f90 and renamed it 
continuation_1.f90.  Added new test case continuation_2.f90

OK for trunk?

Regards,

Jerry

2006-09-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/19260
	* scanner.c (gfc_next_char_literal): Add check for missing '&'
	and set locus to old_locus.
	* options.c (gfc_post_options): Don't set Wampersand when pedantic.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr19260.diff
Type: text/x-patch
Size: 1344 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060920/10746706/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: continuation_1.f90
Type: text/x-fortran
Size: 595 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060920/10746706/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: continuation_2.f90
Type: text/x-fortran
Size: 212 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060920/10746706/attachment-0002.bin>


More information about the Fortran mailing list