This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: wprintf warning
- From: Tolga Dalman <ates100 at web dot de>
- To: Jim Marshall <jim dot marshall at wbemsolutions dot com>
- Cc: gcc at gnu dot org
- Date: Thu, 8 May 2003 12:17:42 +0200
- Subject: Re: wprintf warning
- References: <3EB97B5C.9050900@wbemsolutions.com>
hi,
On Wed, 07 May 2003 17:32:12 -0400 Jim Marshall <jim.marshall@wbemsolutions.com>
wrote:
> Hello,
> I'm sure this has been asked before, but UI can not find the answer via
> searching this list or on google. I'm testing out the use of wchar.h for
> a project I'm working on, I wrote a simple "Hello World" program, but it
> gives me a warning when it is compiled with -Wall:
>
> /* wprint_test.c */
> #include <stdio.h>
> #include <wchar.h>
>
> int main(int argc, char** argv) {
> wprintf(L"Hello World\n");
> return 0;
> }
>
> When I compile this with -Wall I get:
>
> cc -Wall wprint_test.c
> wprint_test.c: In function 'main':
> wprint_test.c:5: warning: implicit declaration of function 'wprintf'
>
> what do I need to do to compile with -Wall and not get this warning (I
> have tried adding -D__USE_ISOC99 and -D__USE_UNIX98). Is it possible?
>
> Using gcc 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
you have to add "-std=c99" resp. "-std=gnu99". i believe, for such questions,
you should query the gcc-help mailinglist.
brg,
Tolga Dalman.