| www.delorie.com/archives/browse.cgi | search |
| 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)" <yselkowitz AT users DOT sourceforge DOT net> |
| To: | cygwin AT cygwin DOT com |
| Date: | Tue, 07 Feb 2012 20:39:46 -0600 |
| Mime-Version: | 1.0 |
| 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 |
Just came across an issue with <sys/wait.h> in C++. STC:
$ cat test.c
#include <stddef.h>
#include <sys/wait.h>
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |