This is the mail archive of the gcc-help@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]
Other format: [Raw text]

g++ compilation error on gcc 4.4.6


Hello There 

While trying to compile my c++ application with new gcc/g++ I am hitting the below error .
Where as I see the timeval is defined in time.h and I have included time.h 

/vob/ngn_src/include/CpsCmnTime.h:457: error: invalid use of incomplete type 'const struct timeval'
/vob/ngn_src/include/CpsCmnTime.h:160: error: forward declaration of 'const struct timeval'

My declaration is as below .

inline static bool setTime (struct timespec& pTimespec, struct timeval???????? const &pTimeVal);

inline? bool CpsCmnTime::setTime (struct timespec& pTimespec,
???????????????????? struct timeval const &pTimeVal)
{
? pTimespec.tv_sec = pTimeVal.tv_sec + (pTimeVal.tv_usec / 10000000);
?? (pTimeVal.tv_usec % 1000000)
???? ? pTimespec.tv_nsec = (pTimeVal.tv_usec % 1000000) * 1000
?? : pTimespec.tv_nsec = 0;
? return true;
}

Thanks
Gaurav 


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