Annotation of researchv10no/cmd/f2c/memo, revision 1.1

1.1     ! root        1: hash constants
        !             2: 
        !             3: ? prototypes for generated functions at start under -A
        !             4: 
        !             5: ? logical*1 as separate type? (currently treated as LOGICAL, with error msg).
        !             6: 
        !             7: complex function zork*16(x) ? [obvious change to gram.head, i.e.,
        !             8:        changing
        !             9:                | type SFUNCTION new_proc entryname arglist
        !            10:                        { entrypt(CLPROC, $1, varleng, $4, $5); }
        !            11:        to
        !            12:                | type SFUNCTION new_proc entryname lengspec arglist
        !            13:                        { entrypt(CLPROC, $1, $5, $4, $6); }
        !            14:        doesn't work: it thinks functionzork is one word]
        !            15: 
        !            16: f8x control structures: for labels of DO, add to defines.h:
        !            17: #define CLLABEL 8
        !            18: #define PLABEL 5
        !            19: for vclass and vprocclass, resp.
        !            20: 
        !            21: 
        !            22: -------------
        !            23: 
        !            24: /n/research/netlib/f2c/F2C invoked /n/crab/usr/ehg/bin/netlib.f2c .
        !            25: 
        !            26: -------------
        !            27: 
        !            28: 11 July 1989:
        !            29:    No args to f2c ==> filter (read stdin, write stdout).
        !            30: 
        !            31: 17 July 1989:
        !            32:    -ext ==> complain of f77 extensions (automatic, static,
        !            33: double complex, constants [binary, octal, hex]).
        !            34: 
        !            35: 17 July 1989
        !            36:    -z ==> do not recognize double complex intrinsics.
        !            37:    ASSIGNED var ==> char *var_fmt rather than char *Var.
        !            38: 
        !            39: 3 Aug. 1989
        !            40:    -a ==> use AUTOMATIC storage for variables that are neither
        !            41: initialized nor involved in EQUIVALENCEs (debug option).
        !            42: 
        !            43:        4 Aug. 1989
        !            44:    Bug in output.c: str_fmt should have "%%" rather than "%".
        !            45:    Format_data.c: k was too small by one in the malloc call
        !            46: at the start of make_one_const().
        !            47: 
        !            48: 8 Aug. 1989:
        !            49:    New flag -r8 promotes REAL to DOUBLE PRECISION, COMPLEX to
        !            50: DOUBLE COMPLEX (a la Berkeley f77).
        !            51: 
        !            52: 10 Aug. 1989:
        !            53:    Allow \n in
        !            54:        print *,'\nHello, world!'
        !            55:    Tweaks to -I2, making it more like f77's -I2; new flag -i2.
        !            56:    -[Ii]2 are two flavors of rendering INTEGER as short rather
        !            57: than long int: -i2 goes further and assumes modified lib[FI]77.
        !            58: 
        !            59: 11 Aug. 1989:
        !            60:    Quietly allow names up to 8 characters long (except under -ext).
        !            61:    Complain about, then ignore arguments to a main program.
        !            62:    Under -u, complain just once about each undeclared variable.
        !            63: 
        !            64: 
        !            65: 31 Aug. 1989:
        !            66:    putx inserted in putaddr (putpcc.c) so A(min(i,j)) works,
        !            67: with A an array; the change:
        !            68:        < return (expptr) p;
        !            69:        ---
        !            70:        >       if (p->isarray && p->memoffset)
        !            71:        >               p->memoffset = putx(p->memoffset);
        !            72:        >       return (expptr) p;
        !            73: This required augmenting the simplification logic in mkexpr()
        !            74: to turn A(((...)<<2)/4) into A(...).  Now multiplications by
        !            75: integer constant powers of 2 are sometimes rendered as shifts,
        !            76: (only in I/O stmts?) where before they were multiplications.
        !            77: This may be a result of the putx in putaddr.
        !            78: 
        !            79: 31 Aug. 1989:
        !            80:    7 and 8 character C and I/O keywords added to c_keywords.
        !            81:    Rewrote in_vector to use binary search and simply know that
        !            82: it's looking at c_keywords -- somewhat faster (e.g. 20%), but
        !            83: these lookups should be done just once, rather than each time
        !            84: the variable is printed out.
        !            85: 
        !            86: 31 Aug. 1989:
        !            87:    A file named block_data was left in the current directory
        !            88: when there was block data.  Now it's /tmp/f2cnnnnn_blkd.
        !            89: 
        !            90: 31 Aug. 1989:
        !            91:    LOGICAL*1 type stmts now generate just one error msg
        !            92: (rather than one per variable) and don't inhibit output of
        !            93: the .c file; LOGICAL*1 is simply treated as logical.
        !            94: 
        !            95: 31 Aug. 1989:
        !            96: 
        !            97:        subroutine foo(x)
        !            98:        integer x(10)
        !            99:        write(*,x)
        !           100:        end
        !           101: 
        !           102: now works (as it did for f77); under -ext, it elicits a message.
        !           103: For completeness,
        !           104: 
        !           105:        subroutine foo(x)
        !           106:        integer x(10)
        !           107:        write(*,x(3))
        !           108:        end
        !           109: 
        !           110: now works similarly.
        !           111: 
        !           112: 5 Sept. 1989:
        !           113:    Fixed botch in argument passing of substrings of equivalenced variables.
        !           114: 
        !           115: 15 Sept. 1989:
        !           116:    Warn about incorrect code generated when a character-valued
        !           117: function is not declared external and is passed as a parameter
        !           118: before it is invoked.  (For f77, this is the old "Code may be wrong"
        !           119: message, which now should appear when it may be appropriate, rather
        !           120: than when it is not.)  Example:
        !           121: 
        !           122:        subroutine foo(a,b)
        !           123:        character*10 a,b
        !           124:        call goo(a,b)
        !           125:        b = a(3)
        !           126:        end
        !           127: 
        !           128: 18 Sept. 1989:
        !           129:    Complain about overlapping initializations.
        !           130: 
        !           131: 20 Sept. 1989:
        !           132:    Warn about names declared EXTERNAL but never referenced;
        !           133: include such names as externs in the generated C (even
        !           134: though most C compilers will discard them).
        !           135: 
        !           136: 21 Sept. 1989:
        !           137:    Fix bug encountered in the following (a combination of
        !           138: an EXTERNAL subroutine parameter and IMPLICIT CHARACTER):
        !           139: 
        !           140:        subroutine b(asmbly,x)
        !           141:        implicit character*7(a-z)
        !           142:        external asmbly
        !           143:        call asmbly(x)
        !           144:        end
        !           145: 
        !           146: 21 Sept. 1989:
        !           147:    New option -w8 to suppress complaint when COMMON or EQUIVALENCE
        !           148: forces word alignment of a double.
        !           149: 
        !           150: 22 Sept. 1989:
        !           151:    Under -A, ensure that floating constants contain either a decimal
        !           152: point or an exponent field.
        !           153:    Fixed bugs with ichar: nonarithmetic operand encountered in...
        !           154: 
        !           155:        subroutine foo(ch,i)
        !           156:        common /zork/ x
        !           157:        character*1 x(256), ch, y
        !           158:        integer i
        !           159:        x(ichar(ch)) = char(i)
        !           160:        end
        !           161: 
        !           162: and wrong ichar(ch) (missing *) in...
        !           163: 
        !           164:        subroutine bar(ch,i)
        !           165:        character*1 ch
        !           166:        integer i
        !           167:        i = ichar(ch)
        !           168:        end
        !           169: 
        !           170:    Fixed bug with intrinsic char function: wrong code for char(b) in...
        !           171: 
        !           172:        subroutine george(a,b)
        !           173:        character*11 a
        !           174:        integer b
        !           175:        a(b:b) = char(b)
        !           176:        end
        !           177: 
        !           178:    Restored f77's character*1 optimizations: neither s_cmp nor s_copy for...
        !           179: 
        !           180:        subroutine zork(a,b)
        !           181:        character*1 a,b*3,c,d(4)
        !           182:        if (c .lt. a) c = a
        !           183:        if (d(3) .gt. c) d(3) = c
        !           184:        if (b(1:1) .eq. d(2)) b(2:2) = d(2)
        !           185:        end
        !           186: 
        !           187:    Supplied semicolon missing before "} else {" in the following...
        !           188: 
        !           189:                subroutine bop(n,L)
        !           190:                logical L
        !           191:                integer i, nok
        !           192:        
        !           193:                if (L) then
        !           194:                        do 10 i = 1, n
        !           195:                                if (nok(i) .gt. 0) goto 20
        !           196:         10                     continue
        !           197:         20                     continue
        !           198:                        else
        !           199:                                call glop(idnt(3))
        !           200:                        endif
        !           201:                end
        !           202: 
        !           203:    Don't declare variables used only in defining statement functions.
        !           204:    Always assume floating-point valued routines in libF77 return
        !           205: doubles, even under -R.
        !           206: 
        !           207: 23 Sept. 1989:
        !           208:    Arguments to subroutines having multiple entry points were
        !           209: sometimes lost.  Example: na was omitted from dlu_0_ in
        !           210: 
        !           211:        subroutine dlu (na,a,nb,b,error)
        !           212:        implicit integer(i-n),double precision(a-h,o-z)
        !           213:        dimension a(na,na,1),b(na,1)
        !           214:        integer error
        !           215:        entry dlu1f (na,a,nb,b,error)
        !           216:                call goo(na,a,nb,b,error)
        !           217:        end
        !           218: 
        !           219:    Offsets were sometimes lost or added twice on equivalenced
        !           220: variables in certain contexts; structure names were omitted
        !           221: from character variables in COMMON that were used as formats
        !           222: or internal files.  An example that had several such errors:
        !           223: 
        !           224:        subroutine boo12
        !           225:        common /zork/ a, b, struct
        !           226:        character*80 a, b, struct,d
        !           227:        character*40 e(2), f
        !           228:        equivalence(b,d), (e(2),f)
        !           229:        write(f,10) f
        !           230:        write(b,10) a
        !           231:        write(struct,10) a
        !           232:  10    format(a80)
        !           233:        write(d,10) d
        !           234:        if (f(4:4) .lt. b(5:5)) f(6:6) = d(7:7)
        !           235:        struct = b
        !           236:        write(b(10:30),10) b(12:32)
        !           237:        write(d(15:25),10) d(20:30)
        !           238:        write(e(2),f)
        !           239:        write(f(30:40), f(50:60))
        !           240:        end
        !           241: 
        !           242:    Repaired invalid P1_HEAD class encountered by
        !           243: 
        !           244: 10     format(' hello, world!')
        !           245:        write(6,10)
        !           246:        end
        !           247: 
        !           248: 28 Sept. 1989:
        !           249:    Warn about variables that appear only in data stmts; don't emit them.
        !           250: 
        !           251: 2 Oct. 1989:
        !           252:    Fix bugs in character DATA for noncharacter variables
        !           253: involved in EQUIVALENCE.
        !           254:    Treat noncharacter variables initialized (at least partly) with
        !           255: character data as though they were equivalenced -- put out a struct
        !           256: and #define the variables.  This eliminates the hideous and nonportable
        !           257: numeric values that were used to initialize such variables.
        !           258:    IMPLICIT NONE treated as IMPLICIT UNDEFINED(A-Z) .
        !           259:    New option -!I disables includes (for netlib).
        !           260:    Bail out when given an invalid flag.
        !           261: 
        !           262: 5 October 1989:
        !           263:    Change retval to ret_val in multiple-entry subprograms.
        !           264:    Change ret_val_nnn to ret_val in functions.
        !           265:    Omit unused dim_ values for final array extents.
        !           266:    New option -W nnn specifies nnn characters/word (for Hollerith data).
        !           267:    New naming scheme for generated variables; such "system variables"
        !           268: are now sorted by type, and more of them are recycled (and fewer declared).
        !           269: 
        !           270: 6 October 1989:
        !           271:    Bug fix: x(i:min(i+10,j)) elicited "Can't handle opcode 31 yet".
        !           272:    Simplify expressions (i+const1)-(i+const2) to const1-const2,
        !           273: where i is a scalar integer variable (and const1 or const2 may be
        !           274: missing ==> taken to be 0).  Thus
        !           275:        x(i:i) = y[j+3:j+3]
        !           276: (both expressions having length 1) is now done in-line,
        !           277: without a call on s_copy.
        !           278: 
        !           279: 7 October 1989:
        !           280:    Initialize uninitialized portions of character string arrays to 0
        !           281: rather than to blanks.
        !           282: 
        !           283: 8 October 1989:
        !           284:    New options -g for # nn "file", -c for /*< Fortran source >*/.
        !           285: 
        !           286: 9 October 1989:
        !           287:    ! recognized as in-line comment delimiter (a la Fortran 88).
        !           288: 
        !           289: apparent bug in Microsoft C 5.10: gram.c: must add
        !           290:        static void zap(long n) {}
        !           291: and insert
        !           292:        zap(varleng);
        !           293: after the C generated for the first lengspec rule in gram.dcl ({ $$ = varleng; }).
        !           294: 
        !           295: MSDOS: cl -nologo -AL -Gt28 -Os -c
        !           296: -->    cl -nologo -AL -Gt28 -Odt -c
        !           297: 
        !           298: cl -c -Alfw -Gt28 gram.c
        !           299: gram.c(676): warning C4058: address of automatic (local) variable taken, DS != SS
        !           300: gram.c(756): "         "....
        !           301: 
        !           302: Optimization bug with proc.c: newentry omitted segment from return value.
        !           303: 
        !           304: Error on line 235 of gqtst.f: wrong number of subscripts on [garbage]

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.