This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Prec/RFA] fix build error of prec in cygwin


Hui Zhu wrote:
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));

I think there is a typo. If you use "%zu", you will see the expected warning.



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.



Jie


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]