Article View: gnu.gcc.help
Article #50764Re: protoize
From: Ronald F. Guilmette
Date: Sat, 21 Aug 1993 19:53
Date: Sat, 21 Aug 1993 19:53
33 lines
2251 bytes
2251 bytes
In article <1993Aug20.145911.22248@lehman.com> josh@phoenix.shearson.com writes: >I have a project I inherited with ~300,000 lines of sloppy non ANSI C code Join the club. >in about 250 files. I want to make this code ANSI compliant in preparation >for a conversion to C++, at which point, hopefully, I can reuse much of this >code. In switching to GNUC gcc version 2.4.5 from the SUN C compiler under >SunOs 4.1.1, I discovered protoize, which does a great job of generating >ANSI function declarations for old C code. However, it doesn't do two >things I would like it to, or I am missing some options. > > a) generate a prototype at the top of a source file if a function > is used/explicitly declared before the true declaration at the > beginning of a function. Protoize was built with the same philosophy as most UNIX tools are built... i.e. it does only one job, and it tries to do that properly. It's job is to convert EXISTING declarations and definition of functions to prototype format. If you want a tool which actually inserts brand new function declarations into your code.... well, you need another (separate) tool. > b) detect a function declaration with the wrong return type. This looks like a job for lint. It is not the responsibility of protoize to find bugs and/or glitches in your code. Protoize's ONLY job is to put in the prototypes. -- -- Ronald F. Guilmette ------------------------------------------------------ ------ domain address: rfg@netcom.com --------------------------------------- ------ uucp address: ...!uunet!netcom.com!rfg -------------------------------
Technical Details
Message-ID:
<rfgCC4KKu.HGr@netcom.com>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!yeshua.opl.com!charnel!rat!decwrl!netcomsv!netcom.com!rfgReferences:
<1993Aug20.145911.22248@lehman.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,184ee68ef8c59032 X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-08-21 13:10:33 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!yeshua.opl.com!charnel!rat!decwrl!netcomsv!netcom.com!rfg From: rfg@netcom.com (Ronald F. Guilmette) Subject: Re: protoize Message-ID: <rfgCC4KKu.HGr@netcom.com> Organization: Netcom Online Communications Services (408-241-9760 login: guest) References: <1993Aug20.145911.22248@lehman.com> Date: Sat, 21 Aug 1993 19:53:18 GMT Lines: 33