diff options
author | foreese <foreese@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-11-03 16:00:58 +0000 |
---|---|---|
committer | foreese <foreese@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-11-03 16:00:58 +0000 |
commit | 2c6287872512f18fce8f39bd5e9a4ba47a8a4a0f (patch) | |
tree | 4b94c9ccf0d58309cda7b6af4ee09b7212fc57fa /gcc/fortran/gfortran.texi | |
parent | 0285f4abfe071745b30224316e4d315ff6f309e1 (diff) |
Support legacy PARAMETER statements with -std=legacy.
gcc/fortran/
* decl.c (gfc_match_parameter): Allow omitted '()' with -std=legacy.
* parse.c (decode_statement): Match "parameter" before assignments.
* gfortran.texi: Document.
gcc/testsuite/gfortran.dg/
* dec_parameter_1.f: New test.
* dec_parameter_2.f90: Likewise.
* dec_parameter_3.f90: Likewise.
* dec_parameter_4.f90: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241823 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/gfortran.texi')
-rw-r--r-- | gcc/fortran/gfortran.texi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index e65c2decad2..cd2c5a52575 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -1471,6 +1471,7 @@ compatibility extensions along with those enabled by @option{-std=legacy}. * .XOR. operator:: * Bitwise logical operators:: * Extended I/O specifiers:: +* Legacy PARAMETER statements:: @end menu @node Old-style kind specifications @@ -2696,6 +2697,23 @@ supported on other systems. @end table +@node Legacy PARAMETER statements +@subsection Legacy PARAMETER statements +@cindex PARAMETER + +For compatibility, GNU Fortran supports legacy PARAMETER statements without +parentheses with @option{-std=legacy}. A warning is emitted if used with +@option{-std=gnu}, and an error is acknowledged with a real Fortran standard +flag (@option{-std=f95}, etc...). These statements take the following form: + +@smallexample +implicit real (E) +parameter e = 2.718282 +real c +parameter c = 3.0e8 +@end smallexample + + @node Extensions not implemented in GNU Fortran @section Extensions not implemented in GNU Fortran @cindex extensions, not implemented |