🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by James Uther Wed, 15 Apr 1992 00:36
allowing non-inline function parameters?
#60
Author: James Uther
Date: Wed, 15 Apr 1992 00:36
10 lines
709 bytes
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).
	thanks for all the help
	James Uther
	jimu@cs.su.oz.au
Re: allowing non-inline function parameters?
#62
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads