This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Prec/RFA] fix build error of prec in cygwin
I tried with gcc.
cat 1.c
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdint.h>
int
main(int argc,char *argv[],char *envp[])
{
printf ("%uz", sizeof (int));
return (0);
}
gcc -std=c89 -Wall -pedantic 1.c
No warning.
Thanks,
Hui
On Fri, May 22, 2009 at 14:55, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Thu, 21 May 2009 23:05:45 -0700
>> From: Joel Brobecker <brobecker@adacore.com>
>>
>> > "%zu"
>>
>> Are we allowed to use %z?
>
> No, I don't think so.
>
>> I thought that %z is C99
>
> It is.
>
> I think the best we can do with C90 is use %lu and cast to
> `unsigned long'.
>