You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by "Devanathan, Ramkumar (HP Software BTO)" <ra...@hp.com> on 2007/06/03 11:26:56 UTC
Problem - RegularExpression.hpp - Xerces 2.7
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.
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.
I get this compile-error when including xerces headers to use with my
app - i see that compiler options can be a difference here, but i am not
aware of what compiler option i can use to do the implicit conversion
that's required here.
Any fix for this. i.e. without changing the code?
Thank you.
Ramkumar Devanathan
HP Software BTO R&D
Bangalore
India
PHONE: (91)-80-2205-2219
RE: Problem - RegularExpression.hpp - Xerces 2.7
Posted by "Devanathan, Ramkumar (HP Software BTO)" <ra...@hp.com>.
Dave, thanks for your reply.
I checked in Token.hpp and this is an unnamed-enum within the Token { }
namespace.
Having said that, the problem is not with xerces headers - they are
fine.
The problem arises due to headers from one of our internal component
wherein a match for the == and =! operator functions is available
causing the error/conflict.
For now, I have modified the code in the RegularExpression.hpp to
explicitly typecast as (const unsigned short) so that there is no
conflict.
Thank you.
Ramkumar Devanathan
HP Software BTO R&D
Bangalore
India
PHONE: (91)-80-2205-2219
-----Original Message-----
From: David Bertoni [mailto:dbertoni@apache.org]
Sent: Monday, June 04, 2007 12:53 AM
To: c-users@xerces.apache.org
Subject: Re: Problem - RegularExpression.hpp - Xerces 2.7
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
Re: Problem - RegularExpression.hpp - Xerces 2.7
Posted by David Bertoni <db...@apache.org>.
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