Bug 17164 – [REG 2.072.0] undefined identifier '__va_argsave'

Status
RESOLVED
Resolution
WONTFIX
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Mac OS X
Creation time
2017-02-09T09:02:00Z
Last change time
2017-02-23T13:39:50Z
Assigned to
nobody
Creator
doob

Comments

Comment #0 by doob — 2017-02-09T09:02:31Z
The following code compiled with DMD 2.071.2 but since 2.072.0 it fails to compile: import core.vararg; void foo(string fmt, ...) { auto a = __va_argsave; } Error: main.d(5): Error: undefined identifier '__va_argsave', did you mean struct '__va_argsave_t'?
Comment #1 by bugzilla — 2017-02-23T07:19:13Z
__va_argsave is an internal symbol with more or less magic semantics. Support for it has been removed, as proper stdarg semantics now works. Use core.stdc.stdarg, and va_list, va_start, va_arg and va_end. https://github.com/dlang/dmd/pull/5779
Comment #2 by doob — 2017-02-23T13:39:50Z
It's documented for D1 [1], under "C-style Variadic Functions". I still think it's a regressions, this code originated from D1. [1] http://www.digitalmars.com/d/1.0/function.html