Was: gcc 4.0.4: warning: implicit declaration of function 'wprintf'

>> The problem is to debug a big source
>> code. It is easy to forget the L before wide strings.
>
> I agree.  I think the committee made a huge mistake my not providing 
> a mechanism by where  the "default" type of char for "test" could be
> specified.

  Another example, to explicit show this kind of bug:

[EMAIL PROTECTED]:~/programming/c/problem$ cat problem.c
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>

int main (int argc, char ** argv) {

wprintf ("Hello,\n"); // L is missing.

return EXIT_SUCCESS;
}
[EMAIL PROTECTED]:~/programming/c/problem$ gcc -Wall problem.c -o problem
problem.c: In function 'main':
problem.c:7: warning: implicit declaration of function 'wprintf'
[EMAIL PROTECTED]:~/programming/c/problem$ ./problem
[EMAIL PROTECTED]:~/programming/c/problem$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,fortran,objc,obj-c++,ada,treelang
--prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.1-1.4.2.0/jre
--enable-mpfr --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060613 (prerelease) (Debian 4.1.1-5)





To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/c-prog/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to