D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 12450 - Deprecated code in std.stdio.readf
Summary: Deprecated code in std.stdio.readf
Status: RESOLVED DUPLICATE of issue 8260
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-24 05:31 UTC by bearophile_hugs
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2014-03-24 05:31:28 UTC
void main() {
    import std.stdio: readf, stdin;
    int[] v;
    stdin.readf("%(%d %)", v);
}


dmd 2.066alpha:

...\dmd2\src\phobos\std\format.d(575,26): Deprecation: using * on an array is deprecated; use *(_param_2).ptr instead
...\dmd2\src\phobos\std\format.d(586,13): Deprecation: using * on an array is deprecated; use *(_param_2).ptr instead
Comment 1 Andrej Mitrovic 2014-04-21 20:35:28 UTC
Even if worked around the code doesn't seem to work at runtime:

object.Exception@C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(4069): Wrong unformat specifier '%(' for int

Do you know if 'stdin.readf("%(%d %)", array);' has ever been supported?
Comment 2 basile-z 2015-11-27 16:18:12 UTC
You've already reported it ^^

*** This issue has been marked as a duplicate of issue 8260 ***