| 1 | 31 Aug. 1989:
|
|---|
| 2 | 1. A(min(i,j)) now is translated correctly (where A is an array).
|
|---|
| 3 | 2. 7 and 8 character variable names are allowed (but elicit a
|
|---|
| 4 | complaint under -ext).
|
|---|
| 5 | 3. LOGICAL*1 is treated as LOGICAL, with just one error message
|
|---|
| 6 | per LOGICAL*1 statement (rather than one per variable declared
|
|---|
| 7 | in that statement). [Note that LOGICAL*1 is not in Fortran 77.]
|
|---|
| 8 | Like f77, f2c now allows the format in a read or write statement
|
|---|
| 9 | to be an integer array.
|
|---|
| 10 |
|
|---|
| 11 | 5 Sept. 1989:
|
|---|
| 12 | Fixed botch in argument passing of substrings of equivalenced
|
|---|
| 13 | variables.
|
|---|
| 14 |
|
|---|
| 15 | 15 Sept. 1989:
|
|---|
| 16 | Warn about incorrect code generated when a character-valued
|
|---|
| 17 | function is not declared external and is passed as a parameter
|
|---|
| 18 | (in violation of the Fortran 77 standard) before it is invoked.
|
|---|
| 19 | Example:
|
|---|
| 20 |
|
|---|
| 21 | subroutine foo(a,b)
|
|---|
| 22 | character*10 a,b
|
|---|
| 23 | call goo(a,b)
|
|---|
| 24 | b = a(3)
|
|---|
| 25 | end
|
|---|
| 26 |
|
|---|
| 27 | 18 Sept. 1989:
|
|---|
| 28 | Complain about overlapping initializations.
|
|---|
| 29 |
|
|---|
| 30 | 20 Sept. 1989:
|
|---|
| 31 | Warn about names declared EXTERNAL but never referenced;
|
|---|
| 32 | include such names as externs in the generated C (even
|
|---|
| 33 | though most C compilers will discard them).
|
|---|
| 34 |
|
|---|
| 35 | 24 Sept. 1989:
|
|---|
| 36 | New option -w8 to suppress complaint when COMMON or EQUIVALENCE
|
|---|
| 37 | forces word alignment of a double.
|
|---|
| 38 | Under -A (for ANSI C), ensure that floating constants (terminated
|
|---|
| 39 | by 'f') contain either a decimal point or an exponent field.
|
|---|
| 40 | Repair bugs sometimes encountered with CHAR and ICHAR intrinsic
|
|---|
| 41 | functions.
|
|---|
| 42 | Restore f77's optimizations for copying and comparing character
|
|---|
| 43 | strings of length 1.
|
|---|
| 44 | Always assume floating-point valued routines in libF77 return
|
|---|
| 45 | doubles, even under -R.
|
|---|
| 46 | Repair occasional omission of arguments in routines having multiple
|
|---|
| 47 | entry points.
|
|---|
| 48 | Repair bugs in computing offsets of character strings involved
|
|---|
| 49 | in EQUIVALENCE.
|
|---|
| 50 | Don't omit structure qualification when COMMON variables are used
|
|---|
| 51 | as FORMATs or internal files.
|
|---|
| 52 |
|
|---|
| 53 | 2 Oct. 1989:
|
|---|
| 54 | Warn about variables that appear only in data stmts; don't emit them.
|
|---|
| 55 | Fix bugs in character DATA for noncharacter variables
|
|---|
| 56 | involved in EQUIVALENCE.
|
|---|
| 57 | Treat noncharacter variables initialized (at least partly) with
|
|---|
| 58 | character data as though they were equivalenced -- put out a struct
|
|---|
| 59 | and #define the variables. This eliminates the hideous and nonportable
|
|---|
| 60 | numeric values that were used to initialize such variables.
|
|---|
| 61 | Treat IMPLICIT NONE as IMPLICIT UNDEFINED(A-Z) .
|
|---|
| 62 | Quit when given invalid options.
|
|---|
| 63 |
|
|---|
| 64 | 8 Oct. 1989:
|
|---|
| 65 | Modified naming scheme for generated intermediate variables;
|
|---|
| 66 | more are recycled, fewer distinct ones used.
|
|---|
| 67 | New option -W nn specifies nn characters/word for Hollerith
|
|---|
| 68 | data initializing non-character variables.
|
|---|
| 69 | Bug fix: x(i:min(i+10,j)) used to elicit "Can't handle opcode 31 yet".
|
|---|
| 70 | Integer expressions of the form (i+const1) - (i+const2), where
|
|---|
| 71 | i is a scalar integer variable, are now simplified to (const1-const2);
|
|---|
| 72 | this leads to simpler translation of some substring expressions.
|
|---|
| 73 | Initialize uninitialized portions of character string arrays to 0
|
|---|
| 74 | rather than to blanks.
|
|---|
| 75 |
|
|---|
| 76 | 9 Oct. 1989:
|
|---|
| 77 | New option -c to insert comments showing original Fortran source.
|
|---|
| 78 | New option -g to insert line numbers of original Fortran source.
|
|---|
| 79 |
|
|---|
| 80 | 10 Oct. 1989:
|
|---|
| 81 | ! recognized as in-line comment delimiter (a la Fortran 88).
|
|---|
| 82 |
|
|---|
| 83 | 24 Oct. 1989:
|
|---|
| 84 | New options to ease coping with systems that want the structs
|
|---|
| 85 | that result from COMMON blocks to be defined just once:
|
|---|
| 86 | -E causes uninitialized COMMON blocks to be declared Extern;
|
|---|
| 87 | if Extern is undefined, f2c.h #defines it to be extern.
|
|---|
| 88 | -ec causes a separate .c file to be emitted for each
|
|---|
| 89 | uninitialized COMMON block: COMMON /ABC/ yields abc_com.c;
|
|---|
| 90 | thus one can compile *_com.c into a library to ensure
|
|---|
| 91 | precisely one definition.
|
|---|
| 92 | -e1c is similar to -ec, except that everything goes into
|
|---|
| 93 | one file, along with comments that give a sed script for
|
|---|
| 94 | splitting the file into the pieces that -ec would give.
|
|---|
| 95 | This is for use with netlib's "execute f2c" service (for which
|
|---|
| 96 | -ec is coerced into -e1c, and the sed script will put everything
|
|---|
| 97 | but the COMMON definitions into f2c_out.c ).
|
|---|
| 98 |
|
|---|
| 99 | 28 Oct. 1989:
|
|---|
| 100 | Convert "i = i op ..." into "i op= ...;" even when i is a
|
|---|
| 101 | dummy argument.
|
|---|
| 102 |
|
|---|
| 103 | 13 Nov. 1989:
|
|---|
| 104 | Name integer constants (passed as arguments) c__... rather
|
|---|
| 105 | than c_... so
|
|---|
| 106 | common /c/stuff
|
|---|
| 107 | call foo(1)
|
|---|
| 108 | ...
|
|---|
| 109 | is translated correctly.
|
|---|
| 110 |
|
|---|
| 111 | 19 Nov. 1989:
|
|---|
| 112 | Floating-point constants are now kept as strings unless they
|
|---|
| 113 | are involved in constant expressions that get simplified. The
|
|---|
| 114 | floating-point constants kept as strings can have arbitrarily
|
|---|
| 115 | many significant figures and a very large exponent field (as
|
|---|
| 116 | large as long int allows on the machine on which f2c runs).
|
|---|
| 117 | Thus, for example, the body of
|
|---|
| 118 |
|
|---|
| 119 | subroutine zot(x)
|
|---|
| 120 | double precision x(6), pi
|
|---|
| 121 | parameter (pi=3.1415926535897932384626433832795028841972)
|
|---|
| 122 | x(1) = pi
|
|---|
| 123 | x(2) = pi+1
|
|---|
| 124 | x(3) = 9287349823749272.7429874923740978492734D-298374
|
|---|
| 125 | x(4) = .89
|
|---|
| 126 | x(5) = 4.0005
|
|---|
| 127 | x(6) = 10D7
|
|---|
| 128 | end
|
|---|
| 129 |
|
|---|
| 130 | now gets translated into
|
|---|
| 131 |
|
|---|
| 132 | x[1] = 3.1415926535897932384626433832795028841972;
|
|---|
| 133 | x[2] = 4.1415926535897931;
|
|---|
| 134 | x[3] = 9.2873498237492727429874923740978492734e-298359;
|
|---|
| 135 | x[4] = (float).89;
|
|---|
| 136 | x[5] = (float)4.0005;
|
|---|
| 137 | x[6] = 1e8;
|
|---|
| 138 |
|
|---|
| 139 | rather than the former
|
|---|
| 140 |
|
|---|
|
|---|