[Issue 2320] ABI spec has contradictory information

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 29 10:08:15 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2320


fawzi at gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fawzi at gmx.ch




------- Comment #2 from fawzi at gmx.ch  2008-08-29 12:08 -------
Such an approach would also (as noted) make the "passing on" of vararg
possible.
I would prefer if one finds a syntax to "switch off" the automatic generation
of _argptr and arguments, and is able to pass them directly to the D function.

This cleanly solves most issues with vararg that come form portability (and gdc
has many of them), has a small cost, but it should be ok. D (unlike C) does not
allow one to call a function without having a declaration that shows that it is
a vararg function, so one can safely disregard all C issues.

An issue that is still open is alignement: TypeInfo does not have that
information and without it unpacking (and thus packing) the data cannot keep it
into account.
I think that it is wrong to have pointers to the structure that do not respect
its alignment requirements.

A last note: vararg is not made irrelevant by Variadic templates, because is
some occasions one wants to avoid the extra code usage (but this is no show
stopper, at least to me), and because sometime one wants to have a method in a
class and using Variadic templates makes it final.


-- 



More information about the Digitalmars-d-bugs mailing list