Hello!
Upgraded to gcc 4.2.1 and ran into a following issue:
test case:
#include <iostream>
#include <sstream>
#include <sys/types.h>
#include <linux/unistd.h>
#include <errno.h>
// Declare the gettid syscall.
_syscall0(pid_t, gettid);
int main()
{
std::cout<<"Test for gettid: "<<std::gettid()<<endl;
return 0;
}
It works on gcc 3.6. Incluede all the proper header according to man pages, but
compiler returns:
getid.cpp:10: error: gettid has not been declared
getid.cpp:10: error: expected constructor, destructor, or type conversion
before ; token
getid.cpp: In function int main():
getid.cpp:16: error: gettid was not declared in this scope
Sergey
--
Summary: gettid has not been declared
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: razin at avaya dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33660