Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!usenet.ins.cwru.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!a.gp.cs.cmu.edu!mwm From: mwm@a.gp.cs.cmu.edu (Mark Maimone) Newsgroups: comp.lang.fortran Subject: Re: f2c used as fortran error checker: one experience Keywords: f2c, type checking Message-ID: <10337@pt.cs.cmu.edu> Date: 28 Aug 90 15:14:20 GMT References: <11678@chaph.usc.edu> Organization: Carnegie-Mellon University, CS/RI Lines: 20 The way to do parameter type checking is to run f2c with the "-P" option. This will generate prototype files, listing every function with a typed argument list. The next time you run f2c, it will use the prototypes generated on the first pass to verify the number and types of parameters. I noticed that even the "-P" option didn't catch your int passed to a float. You might want to get the latest version that incorporates the following change (thanks to David Gay): Tue Aug 28 01:56:44 EDT 1990: Fix bug in warnings of inconsistent calling sequences: if an argument to a subprogram was never referenced, then a previous invocation of the subprogram (in the same source file) that passed something of the wrong type for that argument did not elicit a warning message. -- ---------------------------------------------------------------------- Mark Maimone phone: (412) 268 - 7698 Carnegie Mellon Computer Science email: mwm@cs.cmu.edu grad student, vocal jazz and PDQ Bach enthusiast