| Thread overview | |||||
|---|---|---|---|---|---|
|
November 29, 2008 std.math.poly and const | ||||
|---|---|---|---|---|
| ||||
Should the function signature of std.math.poly be (real x, const real[] A), not (real x, real[] A)? The D code at the end of the function clearly doesn't modify A, but I have no idea what the ASM code is doing. Is this a bug? | ||||
November 29, 2008 Re: std.math.poly and const | ||||
|---|---|---|---|---|
| ||||
Posted in reply to dsimcha | dsimcha wrote:
> Should the function signature of std.math.poly be (real x, const real[] A),
> not (real x, real[] A)? The D code at the end of the function clearly doesn't
> modify A, but I have no idea what the ASM code is doing. Is this a bug?
Yes, it should be const.
| |||
November 29, 2008 Re: std.math.poly and const | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sat, 29 Nov 2008 08:22:34 +0300, Walter Bright <newshound1@digitalmars.com> wrote:
> dsimcha wrote:
>> Should the function signature of std.math.poly be (real x, const real[] A),
>> not (real x, real[] A)? The D code at the end of the function clearly doesn't
>> modify A, but I have no idea what the ASM code is doing. Is this a bug?
>
> Yes, it should be const.
crc32 module also needs to be updated. Not only it doesn't use const (but should, it allows compile-time crc32 evaluation), but it also uses char[] instead of string! :)
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply