Deprecation: argument `ul` for format specification `"%lu"` must be `int`, not `ulong`

Mathias LANG geod24 at gmail.com
Tue Aug 25 09:06:27 UTC 2020


On Tuesday, 25 August 2020 at 08:14:23 UTC, ParticlePeter wrote:
> void main()  {
>     import core.stdc.stdio : printf;
>     ulong ul = 0;
>     printf( "%lu\n", ul );
> }
>
> Tested on dmd 2.093 and 2.093.1 (noticed on later first time), 
> with flag -m64.
> Same message when format specifier is %u.
>
> Is this intended behavior?

Yes. You should use `llu`. 
https://en.wikipedia.org/wiki/C_data_types
Also those questions are better suited for the `D.learn` forum.


More information about the Digitalmars-d mailing list