Devanathan, Ramkumar (HP Software BTO) wrote:
Compiler - AIX xlc_r (version 5).
Xerces 2.7
Error Message:
".../include/xercesc/util/regx/RegularExpression.hpp", line 400.19:
1540-0219 (S) The call to "operator!=" has no best match.
".../include/xercesc/util/regx/RegularExpression.hpp", line 400.11:
1540-1228 (I) Argument number 1 is an lvalue of type "const unsigned
short".
".../include/xercesc/util/regx/RegularExpression.hpp", line 400.22:
1540-1229 (I) Argument number 2 is an rvalue of type "<unnamed-enum>".
".../include/xercesc/util/regx/RegularExpression.hpp", line 400.19:
1540-1202 (I) No candidate is better than "builtin operator!=(int,
int)".
".../include/xercesc/util/regx/RegularExpression.hpp", line 400.11:
1540-1231 (I) The conversion from argument number 1 to "int" uses an
lvalue-to-rvalue transformation followed by an integral promotion.
".../include/xercesc/util/regx/RegularExpression.hpp", line 400.22:
1540-1231 (I) The conversion from argument number 2 to "int" uses an
integral promotion.
I find it interesting that the compiler is referring to an "<unnamed-enum>".
This is the offending line -
....
inline Op* RegularExpression::compileSingle(const Token* const token,
Op* const next,
const unsigned short
tokType) {
...
if (tokType != Token::T_EMPTY) <-- compiler error here
ret->setNextOp(next);
....
<<
Apparently implicit conversion between const unsigned short and enum
type will not work, although this is just with AIX.
Funnily when i build xerces libraries, i don't get this compiler error.
What happens if you include the file "xercesc/util/regx/Token.hpp"? The
problem may be that the enum is not known, and the Xerces library code
includes that header file by chance.
Dave