April 26, 2011 [dmd-internals] _aApply… return type: int or size_t? | ||||
---|---|---|---|---|
| ||||
What should the _aApply... runtime functions, or in general, opApply() return? According to the current runtime implementation and http://www.digitalmars.com/d/2.0/statement.html, the return type should be int, but DMD expects Type::tindex (i.e. size_t) in ForeachStatement::semantic(). This is relevant to LDC, where the type is reflected in the backend (well, LLVM IR). David |
April 30, 2011 [dmd-internals] _aApply… return type: int or size_t? | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger |
On 4/25/2011 4:38 PM, David Nadlinger wrote:
> What should the _aApply... runtime functions, or in general, opApply() return? According to the current runtime implementation and http://www.digitalmars.com/d/2.0/statement.html, the return type should be int, but DMD expects Type::tindex (i.e. size_t) in ForeachStatement::semantic().
>
> This is relevant to LDC, where the type is reflected in the backend (well, LLVM IR).
>
>
It should be int.
|
Copyright © 1999-2021 by the D Language Foundation