X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,SPF_NEUTRAL X-Spam-Check-By: sourceware.org Message-ID: <4E4BD899.4070409@cs.utoronto.ca> Date: Wed, 17 Aug 2011 11:04:57 -0400 From: Ryan Johnson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: "cygwin AT cygwin DOT com" Subject: v*printf functions not available with g++ -std=c++0x Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi all, I'm using the experimental gcc-4.5 package and hit a strange error: c++0x mode suppresses the definition of the v*printf() family of functions in stdio.h in c++0x mode. The offending code seems to be: #if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) #ifndef _REENT_ONLY ... int _EXFUN(vsnprintf, (char *, size_t, const char *, __VALIST) _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); ... #endif #endif Running `g++ -std=c++0x -dM -E' indicates that __STRICT_ANSI__ is defined while _REENT_ONLY and __STDC_VERSION__ are not. Oddly, functions like _vsnprintf_r are still available for some strange reason (aren't they extensions?). I hope this is a bug rather than a requirement of the new standard; meanwhile, using std=gnu++0x works around the problem. Ryan -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple