This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: PATCH to allow passing non-trivial types through ...
- From: Mike Stump <mikestump at comcast dot net>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>, Nathan Sidwell <nathan at codesourcery dot com>, Jonathan Wakely <jwakely dot gcc at gmail dot com>, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Mon, 11 Aug 2014 16:31:22 -0700
- Subject: Re: RFC: PATCH to allow passing non-trivial types through ...
- Authentication-results: sourceware.org; auth=none
- References: <53E92F6C dot 5050808 at redhat dot com>
On Aug 11, 2014, at 2:02 PM, Jason Merrill <jason@redhat.com> wrote:
>
> On considering the request, it occurred to me that we could handle variadic arguments of non-trivial types the same way we handle normal value arguments of such types: pass by invisible reference. So this patch implements that. Since it's been so long since this was allowed at all, I don't think we need to worry about ABI incompatibility with the 3.1 behavior.
So, it would be nice if the C++ abi document defined how to pass them. Once it says do it this way, then all people have to do it that way if they want to claim conformance to that doc, and when all do, we then get C++ abi compatibility across compilers (which is nice). If they want to dictate some other convention, then it sure would be nice to know _before_ we ship an abi incompatible version. I’m thinking compatibility with clang for example would be nice. Also, would be nice if the standard mandated it just work, though, that might take another standard to get it in there.