[cxx-abi-dev] Passing non-trivial types through ...

John McCall rjmccall at apple.com
Thu Aug 21 04:34:52 UTC 2014


On Aug 20, 2014, at 8:45 PM, Dennis Handly <dhandly at cup.hp.com> wrote:
>> From: John McCall <rjmccall at apple.com>
>> Oh, yes, that’s definitely a language requirement: you can’t outright reject
>> this construct if it’s not potentially-evaluated.  A lot of template
>> metaprogramming tricks rely on overloads like this.  But it doesn’t affect
>> whether you consider it undefined behavior when it *isn’t* potentially
>> evaluated.
> 
> It turns out we fixed the compiler long ago to not warn for sizeof.
> So that leaves me with no bug test cases of a customer using it.
> But that's only negative evidence.

To me, it sounds like aCC warning about the metaprogramming
use case, you got a bug about it, and you fixed it, but that you never
intended to support actually doing this at runtime.  But it’s your decision,
or I should say HP’s.  If you feel comfortable saying that you do not
currently support passing non-POD types through varargs, and that you
consider it undefined behavior, then I think the best thing for the ABI
is to say that vendors who choose to support non-POD varargs must
follow Jason’s proposal.

Otherwise, we’ll have to be much more weaselly about it. :)

John.


More information about the cxx-abi-dev mailing list