Wayne Johnson
unread,Apr 23, 2013, 12:04:24 PM4/23/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cryptop...@googlegroups.com
I'm trying to port Crypto562 to AIX's xlC compiler (v10.1). I've run into a few issues that I have a workaround for, but this hunk of code is generating a compile error that is stumping me.
Integer.cpp: around line 2867:
const Integer &Integer::One()
{
return Singleton<Integer, NewInteger<1> >().Ref();
}
The compiler gives the following errors:
bash-3.2$ xlC_r -DNDEBUG -g -O2 -c integer.cpp
"integer.cpp", line 282.17: 1540-1608 (W) An anonymous union should only define non-static data members.
"misc.h", line 111.9: 1540-1109 (S) The use of undefined class "CryptoPP::NewInteger<1>" is not valid.
"misc.h", line 111.9: 1540-0700 (I) The previous message was produced while processing "CryptoPP::Singleton<CryptoPP::Integer,CryptoPP::NewInteger<1>,0>::Singleton(NewInteger<1>)".
"integer.cpp", line 2867.16: 1540-0700 (I) The previous message was produced while processing "CryptoPP::Integer::One()".
"misc.h", line 129.39: 1540-0251 (S) The "()" operator cannot be applied to the undefined class "struct NewInteger<1>".
"misc.h", line 121.11: 1540-0700 (I) The previous message was produced while processing "CryptoPP::Singleton<CryptoPP::Integer,CryptoPP::NewInteger<1>,0>::Ref(...) const".
"integer.cpp", line 2869.52: 1540-0700 (I) The previous message was produced while processing "CryptoPP::Integer::One()".
The real stumper is that the lines right after it:
const Integer &Integer::Two()
{
return Singleton<Integer, NewInteger<2> >().Ref();
}
work fine. I can even delete Integer::One() (which is apparently never used) and it works fine too.
Anyone have any suggestions?