[reSIProcate] Compile bug whit g++-4.2.3

Byron Campen bcampen at estacado.net
Mon Jan 14 10:07:29 CST 2008


	This was fixed on head in rev 7310, but never made it into the 1.2  
release branch. At some point next month, I hope to get some time to  
go through all the work that was done since 1.2 was first cut, and  
look for minor bug-fixes to merge into 1.2.4.

Best regards,
Byron Campen

> While compiling works fine with g++-4.1 it fails with g++-4.2.3:
>
> g++ -march=x86-64 -fPIC -D_REENTRANT  -g  -Wall -I..
> -I../build/../contrib/ares -DOS_MAJOR_VER=2 -DOS_MINOR_VER=6
> -DOS_POINT_VER=22-2-amd64 -DOS_PATCH_VER=0 -DUSE_ARES -DUSE_SSL -c - 
> o obj.debug.Linux.x86_64/Timer.o Timer.cxx
> Timer.cxx:259: error: ‘bool resip::operator>(const resip::Timer&,  
> const resip::Timer&)’ should have been declared inside ‘resip’
>
> From my understanding of c++ the code is wrong as the friend  
> declartion of the operator is not a declaration of the function.
> Adding the missing function declaration solves the bug for me. I  
> added the declaration of the operator< as well, although it does  
> (strangely) not
> give a compile error.
>
> --- Timer.hxx   (Revision 7534)
> +++ Timer.hxx   (Arbeitskopie)
> @@ -104,6 +104,8 @@
>        friend class TuSelectorTimerQueue;
>  };
>
> +bool operator<(const Timer& t1, const Timer& t2);
> +bool operator>(const Timer& t1, const Timer& t2);
>  std::ostream& operator<<(std::ostream&, const Timer&);
>
>  }
>
> Greetings
>
> Johannes Dohmen
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2423 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20080114/c64507f1/attachment.bin>


More information about the resiprocate-devel mailing list