Commit ef144767 by Fritz Reese Committed by Fritz Reese

Treat form feed as whitespace.

	gcc/fortran/
	* gfortran.texi: Document.
	* gfortran.h (gfc_is_whitespace): Include form feed ('\f').

	gcc/testsuite/gfortran.dg/
	* feed_1.f90, feed_2.f90: New testcases.

From-SVN: r241517
parent f6d17ecd
2016-10-25 Fritz Reese <fritzoreese@gmail.com>
* gfortran.texi: Document.
* gfortran.h (gfc_is_whitespace): Include form feed ('\f').
2016-10-25 Fritz Reese <fritzoreese@gmail.com>
* invoke.texi, gfortran.texi: Touch up documentation of -fdec.
* gfortran.h (gfc_option): Move flag_dec_structure out of gfc_option.
* decl.c (match_record_decl, gfc_match_decl_type_spec,
......@@ -10,6 +15,7 @@
* lang.opt (fdec): Use Fortran Var to create flag_dec.
* options.c (set_dec_flags): With -fdec enable -fcray-pointer,
-fd-lines-as-comments (default), -fdollar-ok, and legacy std flags.
2016-10-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/77828
......
......@@ -60,7 +60,7 @@ not after.
#define MAX_SUBRECORD_LENGTH 2147483639 /* 2**31-9 */
#define gfc_is_whitespace(c) ((c==' ') || (c=='\t'))
#define gfc_is_whitespace(c) ((c==' ') || (c=='\t') || (c=='\f'))
/* Macros to check for groups of structure-like types and flavors since
derived types, structures, maps, unions are often treated similarly. */
......
......@@ -1465,6 +1465,7 @@ compatibility extensions along with those enabled by @option{-std=legacy}.
* Type variants for integer intrinsics::
* AUTOMATIC and STATIC attributes::
* Extended math intrinsics::
* Form feed as whitespace::
@end menu
@node Old-style kind specifications
......@@ -2510,6 +2511,16 @@ and then multiplying it by a constant radian-to-degree (or degree-to-radian)
factor, as appropriate. The factor is computed at compile-time as 180/pi (or
pi/180).
@node Form feed as whitespace
@subsection Form feed as whitespace
@cindex form feed whitespace
Historically, legacy compilers allowed insertion of form feed characters ('\f',
ASCII 0xC) at the beginning of lines for formatted output to line printers,
though the Fortran standard does not mention this. GNU Fortran supports the
interpretation of form feed characters in source as whitespace for
compatibility.
@node Extensions not implemented in GNU Fortran
@section Extensions not implemented in GNU Fortran
......
2016-10-25 Fritz Reese <fritzoreese@gmail.com>
gfortran.dg/
* feed_1.f90, feed_2.f90: New testcases.
2016-10-25 Martin Liska <mliska@suse.cz>
PR sanitizer/78106
......
! { dg-do compile }
! { dg-options "-ffree-form" }
! Test acceptance of form feed character in free source.
implicit none
integer, volatile :: x
x = 5
end
! { dg-do compile }
! { dg-options "-ffixed-form" }
! Test acceptance of form feed character in fixed source.
implicit none
integer, volatile :: x
x = 5
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment