D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20643 - printf without arguments aborts compilation
Summary: printf without arguments aborts compilation
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 minor
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-06 10:20 UTC by moonlightsentinel
Modified: 2020-04-14 15:28 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description moonlightsentinel 2020-03-06 10:20:13 UTC
DMD correctly reports the missing arguments but aborts compilation because of an "unknown error":

------------------------
extern(C) int printf(const char*, ...);

shared static ~this()
{
    printf("count = %lu\n");
}
-------------------------

test.d(5): Deprecation: more format specifiers than 0 arguments
Error: unknown, please file report on issues.dlang.org
Comment 1 Dlang Bot 2020-03-14 20:12:17 UTC
@Luhrel created dlang/dmd pull request #10921 "Issue 20643 - printf without arguments aborts compilation" mentioning this issue:

- Issue 20643 - printf without arguments aborts compilation

https://github.com/dlang/dmd/pull/10921
Comment 2 Dlang Bot 2020-03-16 00:14:18 UTC
dlang/dmd pull request #10921 "Fix Issue 20643 - printf without arguments aborts compilation" was merged into master:

- 16acede2d0182f3a49d2061236ff095f3e7739df by Luhrel:
  Issue 20643 - printf without arguments aborts compilation

https://github.com/dlang/dmd/pull/10921