This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++/3287: usleep() undeclared


Synopsis: usleep() undeclared

State-Changed-From-To: open->closed
State-Changed-By: aoliva
State-Changed-When: Wed Jun 20 15:05:36 2001
State-Changed-Why:
    The problem is that unistd.h doesn't always declare usleep(), and C++ requires every called function to have been previously declared.  It seems to me that to get the appropriate declaration, you have to use -D_POSIX_SOURCE or -D_XOPEN_SOURCE_EXTENDED.  g++ won't reject the code because of the lack of a declaration if you use -fpermissive.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3287&database=gcc


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]