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]
Other format: [Raw text]

Re: Returning unions (Was: Re: Ping^5: Re: Updated^2: RFA: Fix middle-end/46500 (void * encapsulated))


On Tue, Jun 14, 2011 at 5:44 PM, Joern Rennecke <amylaar@spamcop.net> wrote:
> Quoting Bernd Schmidt <bernds@codesourcery.com>:
>
>> * Most sane ABIs pass single-word structs in registers
>
> Unfortunately, the i386 SYSV ABI (used generally for i386 elf toolchains)
> is half-way insane in that respect: function return of small aggregates also
> goes via a caller-passed pointer to a stack slot. ?(You can avoid that using
> -freg-struct-return, but that option is not safe unless you have a
> full set of multilibs built with that option.)
>
>> * For the most part, gcc runs on i686 and there it doesn't make a
>> ?difference.
>
> It used to make a difference for function value return. ?But apparently
> we have lost that feature of transparent union somewhere between gcc 2.7.0
> and gcc 4.4.5 .
>

Do you have a testcase for i386?


-- 
H.J.


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