[Issue 23538] New: Power operator does not work in -betterC

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 4 08:42:46 UTC 2022


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

          Issue ID: 23538
           Summary: Power operator does not work in -betterC
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: alphaglosined at gmail.com

As of dmd 2.101.0 power operator doesn't work in -betterC for double/double.

Due to using std.math : pow as the hook for this expression, which depends upon
exp2 which isn't templated.


```
extern(C) void main() {
    double input = 3f;
    double power = 2;
    double calculated = input ^^ power;
}
```

```
verify_pow_reg.obj : error LNK2019: unresolved external symbol
__D3std4math11exponential4exp2FNaNbNiNeeZe referenced in function
__D3std4math11exponential__T3powTdTdZQjFNaNbNiNeddZ4implFNaNbNiNfeeZe
```

--


More information about the Digitalmars-d-bugs mailing list