g++/i386: 4-byte inline struct return

Joern Rennecke amylaar@cygnus.co.uk
Thu Sep 17 09:59:00 GMT 1998


> 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.



More information about the Gcc mailing list