🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #62

Re: allowing non-inline function parameters?

#62
From: Joe Buck
Date: Tue, 14 Apr 1992 20:31
18 lines
1199 bytes
In article <4680@cluster.cs.su.oz.au>, jimu@cs.su.oz.au (James Uther) writes:
|> 
|> A nice easy question to get you warmed up for the day:-
|> 
|> I'm trying to compile some old C code with g++ 2.1. Gcc compiles the code 
|> fine, however g++ complains about the function parameters (having types
|> declared in the lines following the function header). How do I fix this?
|> (without rewriting the code).

The C++ language requires prototypes, so you can't get around this.
Fortunately there's a tool called "protoize" by Ron Guilmette (sorry
if I spelled your name wrong, Ron) that converts old-style C code
to C code with prototypes.  It's included in the gcc-2.1 distribution.
It's probably your best bet.


-- 
Joe Buck	jbuck@ohm.berkeley.edu
Technical Details
Message-ID: <sfffpINNghp@agate.berkeley.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!forney.berkeley.edu!jbuck
References: <4680@cluster.cs.su.oz.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!forney.berkeley.edu!jbuck
From: jbuck@forney.berkeley.edu (Joe Buck)
Newsgroups: gnu.g++.help
Subject: Re: allowing non-inline function parameters?
Date: 14 Apr 1992 20:31:53 GMT
Organization: University of California, Berkeley
Lines: 18
Distribution: world
Message-ID: <sfffpINNghp@agate.berkeley.edu>
References: <4680@cluster.cs.su.oz.au>
NNTP-Posting-Host: forney.berkeley.edu