RFC: PATCH to allow passing non-trivial types through ...
Jason Merrill
jason@redhat.com
Mon Aug 11 21:02:00 GMT 2014
A customer was recently complaining about G++ rejecting code that tries
to pass a type with a non-trivial copy constructor through ..., which is
undefined in C++98 and conditionally-supported in C++11. In GCC 3.1 and
below we gave a warning and then did a bitwise copy. From GCC 3.2 to
4.4 we gave a warning and then aborted at runtime. From 4.5 on we have
just given an error.
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.
Thoughts?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pod-vaarg.patch
Type: text/x-patch
Size: 9414 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140811/b6037b11/attachment.bin>
More information about the Gcc-patches
mailing list