This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++/i386: 4-byte inline struct return
- To: hasdi at umich dot edu (Hasdi R Hashim)
- Subject: Re: g++/i386: 4-byte inline struct return
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Thu, 17 Sep 1998 14:27:04 +0100 (BST)
- Cc: egcs at cygnus dot com
> I tried every single trick I could think off to make "foo a = bar(1)" as
> efficient as "long a = 1". I think the problem has to with struct returns
> because when I substitute "struct foo.." with "typedef long foo" I get the
> expected code. Can somebody please work on this? This has enormous
> potential; it would help me and millions other sorry hackers out there.
This problem is ABI related. For instance, you will get better code for
i386-linuxaout that for i386-pc-linux-gnu.
Unless you use -freg-struct-return , but then, you can get problems with
library functions like inet_makeaddr.