Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit f18f6d5

Browse files
committed
core.stdc.config: Fix cpp_ptrdiff_t alias for 32-bit macOS
It's `int`, not `long`, inconsistent with size_t being `unsigned long`.
1 parent 74155c8 commit f18f6d5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/stdc/config.d

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ static assert(is(c_long_double), "c_long_double needs to be declared for this pl
201201
version (Darwin)
202202
{
203203
alias cpp_size_t = cpp_ulong;
204-
alias cpp_ptrdiff_t = cpp_long;
204+
version (D_LP64)
205+
alias cpp_ptrdiff_t = cpp_long;
206+
else
207+
alias cpp_ptrdiff_t = ptrdiff_t;
205208
}
206209
else
207210
{

0 commit comments

Comments
 (0)