This is the mail archive of the cygwin mailing list for the Cygwin 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: 1.7: snprintf() with gcc -std=c99: warning about implicit declaration


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 fully support
C99; it is basically C90-compliant[*], and snprintf is not in C90.  It might
be reasonable to submit a patch to newlib that moved snprintf to somewhere it
could be conditioned on something like

  #if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L)

  I wonder how many other functions would need the same treatment, do you
happen to have an idea?

    cheers,
      DaveK

-- 
[*] - "C90-compliant plus extras"
      http://sourceware.org/ml/newlib/2006/msg00673.html


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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