[Issue 13769] Wrong argument passing for variadic functions in 64 bits

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 31 09:28:40 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=13769

--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
The following:

void main()
{
  import core.vararg, std.stdio;
  void fix() {}

  void test_bug(size_t bug, ...) { assert(bug == size_t.max); }
  void test_fixed(size_t bug, ...) { fix(); assert(bug == size_t.max); }
  void print_bug(size_t bug, ...) { writeln(bug); assert(bug == size_t.max); }
  void print_fix(size_t bug, ...) { fix(); writeln(bug); assert(bug ==
size_t.max); }

  print_bug(size_t.max);
  print_fix(size_t.max);
  test_fixed(size_t.max);
  test_bug(size_t.max);
}

works without error.

--


More information about the Digitalmars-d-bugs mailing list