[Issue 18573] `cast(void)` leads to floating point return value not being popped from FPU stack

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 14 23:13:31 UTC 2019


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

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com

--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> ---
The test case:

  real foo();

  void test1() {
    cast(void)foo();
  }

  void test2() {
    foo();
  }

compiles to:

  __D4test5test1FZv:
             call    __D4test3fooFZe
             ret

  __D4test5test2FZv:
             call    __D4test3fooFZe
             fstp    ST
             ret

which nicely illustrates the problem.

--


More information about the Digitalmars-d-bugs mailing list