Bug 4336 – Variadic arguments (va_arg) break with "out" parameters

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2010-06-16T17:07:00Z
Last change time
2010-06-16T17:21:19Z
Assigned to
nobody
Creator
sky

Comments

Comment #0 by sky — 2010-06-16T17:07:48Z
Considering the following code, both methods should print 1. I get 1245056 on the second call. Bug was present in dmd 1.056, i upgraded to 1.062 and it remains the same. --- module main; import std.stdio; import std.stdarg; void test_ok(int i, ...) { writefln(va_arg!(int)(_argptr)); } void test_fail(out int x, ...) { writefln(va_arg!(int)(_argptr)); } void main() { int i; test_ok(i, 1); test_fail(i, 1); }
Comment #1 by sky — 2010-06-16T17:18:23Z
*** This issue has been marked as a duplicate of issue 1678 ***
Comment #2 by sky — 2010-06-16T17:21:19Z
Sorry, found the original after a while. It's still not fixed :(