X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Message-ID: <1328668786.8060.7.camel@YAAKOV04> Subject: Bug in sys/wait.h with C++ From: "Yaakov (Cygwin/X)" To: cygwin AT cygwin DOT com Date: Tue, 07 Feb 2012 20:39:46 -0600 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Mime-Version: 1.0 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 Just came across an issue with in C++. STC: $ cat test.c #include #include int main(void) { wait(NULL); return 0; } $ gcc -Wall test.c $ gcc -x c++ -Wall test.c test.c: In function ‘int main()’: test.c:2:27: error: call of overloaded ‘wait(NULL)’ is ambiguous /usr/include/sys/wait.h:37:7: note: candidates are: pid_t wait(int*) /usr/include/sys/wait.h:82:14: note: pid_t wait(wait*) This code compiles cleanly on Linux. Yaakov -- 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