[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Auto function binding on gcc?
- To: linuxgames@sunsite.dk
- Subject: Re: Auto function binding on gcc?
- From: Steve Baker <sjbaker1@airmail.net>
- Date: Mon, 10 Jun 2002 19:40:57 -0500
- Delivered-To: archiver@seul.org
- Delivered-To: mailing list linuxgames@sunsite.dk
- Delivery-Date: Tue, 11 Jun 2002 18:52:46 -0400
- Mailing-List: contact linuxgames-help@sunsite.dk; run by ezmlm
- Organization: Steve at Home
- References: <3D065FC4.5060709@379.com>
- Reply-To: linuxgames@sunsite.dk
- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529
J. Perkins wrote:
> I posted this on sweng-gamedev, but it's been pointed out that it
> probably belongs here.
>
> ---
>
> After putting it off for a loooong time, I've been taking a
> look at Scott Bilas' paper on automatic function binding,
> the "FuBi" section of GPG1. This could save me a lot of
> keystrokes over my current system, but I've run into one
> stumbling block: gcc apparently doesn't store the return type
> in the mangled name. Has anyone tried this before? Is there
> a way to get the return type?
Probably not.
C++ allows you to overload functions by their parameter type.
eg:
double foobar ( int param ) { ... }
double foobar ( double param ) { ... }
...but it doesn't allow you to overload them by their return type.
eg
double foobar ( int param ) { ... }
int foobar ( int param ) { ... } /* Illegal */
...hence there is no need to store the return type in the symbol table
and therefore there is no way to determine it from the mangled name.
----------------------------- Steve Baker -------------------------------
Mail : <sjbaker1@airmail.net> WorkMail: <sjbaker@link.com>
URLs : http://www.sjbaker.org
http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
http://prettypoly.sf.net http://freeglut.sf.net
http://toobular.sf.net http://lodestone.sf.net