Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldc2 fails on use of %,d format specifier #2367

Closed
russel opened this issue Oct 16, 2017 · 3 comments
Closed

ldc2 fails on use of %,d format specifier #2367

russel opened this issue Oct 16, 2017 · 3 comments

Comments

@russel
Copy link

russel commented Oct 16, 2017

On Debian Sid, using dmd 2.076 installed by packaging from D-Apt, the code:

import std.stdio: writefln;

int main() {
	writefln("%,d", 10_000_000);
	return 0;
}

compiles and executes fine:

|> dmd integer_format.d
|> integer_format
10,000,000

The same code using ldc 1.4.0 from the Debian repository:

|> ldc2 integer_format.d
|> integer_format
std.format.FormatException@/usr/lib/ldc/x86_64-linux-gnu/include/d/std/format.d(1744): integral
----------------
??:? pure @safe bool std.exception.enforceEx!(std.format.FormatException).enforceEx!(bool).enforceEx(bool, lazy immutable(char)[], immutable(char)[], ulong) [0xfe00b0d]
??:? @safe void std.format.formatValue!(std.stdio.File.LockingTextWriter, int, char).formatValue(std.stdio.File.LockingTextWriter, int, ref const(std.format.FormatSpec!(char).FormatSpec)) [0xfe0055e]
??:? void std.format.formatGeneric!(std.stdio.File.LockingTextWriter, int, char).formatGeneric(std.stdio.File.LockingTextWriter, const(void)*, ref const(std.format.FormatSpec!(char).FormatSpec)) [0xfe001fa]
??:? [0xfe00042]
??:? [0xfdff81c]
??:? [0xfdff76b]
??:? [0xfdff721]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x9a77190e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x9a77184d]
??:? _d_run_main [0x9a771744]
??:? [0xfe0c644]
??:? __libc_start_main [0x99a0c2e0]
??:? [0xfdff619]
@thewilsonator
Copy link
Contributor

1.4.0 is based on 2.074, does this work with dmd using that front end version?

@joakim-noah
Copy link
Contributor

No, it doesn't, only with dmd 2.075.1. Russel, I suggest you just wait till the upcoming 1.5 release.

@kinke
Copy link
Member

kinke commented Oct 16, 2017

... and my forum reply hinting at a likely Phobos mismatch was apparently in vain. :/

@kinke kinke closed this as completed Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants