delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <49EBE12A.1080305@gmail.com> |
Date: | Mon, 20 Apr 2009 03:42:50 +0100 |
From: | Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com> |
User-Agent: | Thunderbird 2.0.0.17 (Windows/20080914) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: 1.7: snprintf() with gcc -std=c99: warning about implicit declaration |
References: | <alpine DOT LNX DOT 2 DOT 00 DOT 0904192315360 DOT 3751 AT fenrir DOT sidaroth DOT foo> |
In-Reply-To: | <alpine.LNX.2.00.0904192315360.3751@fenrir.sidaroth.foo> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |