This is the mail archive of the
cygwin
mailing list for the Cygwin project.
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
- Subject: Bug in sys/wait.h with C++
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