Dear list,

During the last two months, I spent a lot of time trying to remove the 
following warnings of my package randtoolbox:

congruRand.c:180:3: warning: ISO C does not support the 'I64' ms_scanf length 
modifier [-Wformat=]
   sscanf(params[0], "%" PRIu64 "\n", &inp_mod);

Please see

The warning is raised by the option -pedantic added when checking the package 
by R-devel. This warning is due to the use of the macro PRIu64. Note that this 
warning does not show up when I use PRIu64 with printf via Rprintf in other 
parts of the file congruRand.c. 

My first reaction to look at is useless, 
because R on windows uses Mingw-W64 integer types and not the MS version. 

Then, I tried to find information in such as Write Portable Code by Brian Hook 
and C11 (

They do recommend to use the macro SCNu64 (reserved for scanf family) rather 
than PRIu64 reserved for printf family functions. 

Unfortunately when I check the package with R-devel, I still have the warning.

On GitHub, there are a version of mingw64 sources : . It is explicitly written that SCNu64 is 
I64u, see line 210 of

So, I was wondering if this warning was removable at all? Does anyone encounter 
this issue?

Any help is appreciated.

Thanks in advance, Christophe

PS: latest version of randtoolbox source code is here
Christophe Dutang
CEREMADE, Univ. Paris Dauphine, France
Web :

______________________________________________ mailing list

Reply via email to