Thread overview
[Issue 23754] betterC cannot use std.format at compile time
Mar 01, 2023
Walter Bright
Mar 01, 2023
Walter Bright
Mar 11, 2023
Walter Bright
March 01, 2023
https://issues.dlang.org/show_bug.cgi?id=23754

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |betterC
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=18472

--
March 01, 2023
https://issues.dlang.org/show_bug.cgi?id=23754

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|phobos                      |dmd

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
On second thought, it's still another compiler problem. CTFE should still be on when compiling format.

--
March 11, 2023
https://issues.dlang.org/show_bug.cgi?id=23754

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
The problem is illustrated with:

---
void test()
{
    enum s = foo();
}

int foo()
{
    new C();
    return 1;
}

class C { }
---

While executing foo() at compile time works, even with -betterC, the compiler
still tries to generate code for foo(). This produces the error about a
reference to TypeInfo.

--