This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]