Re: 1.7: snprintf() with gcc -std=c99: warning about implicit declaration

2009-04-20 Thread Markus Rinne
On Mon, 20 Apr 2009, Dave Korn wrote: I wonder how many other functions would need the same treatment, do you happen to have an idea? vsnprintf, vscanf, vsscanf and vfscanf have similar situation. Markus Rinne -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem report

Re: 1.7: snprintf() with gcc -std=c99: warning about implicit declaration

2009-04-19 Thread Dave Korn
Markus Rinne wrote: > It seems gcc defines __STRICT_ANSI__ when passed the -std=c99 option That much, at any rate, is as-expected and correct. > and the declaration of snprintf is enclosed in #ifndef __STRICT_ANSI__ > in stdio.h. Ah. Yes, newlib (from where Cygwin takes stdio.h) does not

1.7: snprintf() with gcc -std=c99: warning about implicit declaration

2009-04-19 Thread Markus Rinne
Hello, compiling C programs which use snprintf function with gcc option -std=c99 gives a warning about implicit declaration of snprintf. Should snprintf be declared by including stdio.h when using C99 standard? For example, with the following program in snprintf.c: #include int main(void) {