Christoffer,
Thanks for the error message.
>Is there a reason why inline is not specified in the class XXX ?
>It seems that it would be more safe to just always put "inline" into the
>class declaration instead of reordering the functions.
Yes, I agree with you, adding the "inline" is a bullet proof
solution. We may do it that way for
any new class created later.
I've checked in the file listed below, which shall be available from
the nightly build, please
help me verify, thanks.
/src/util/XMLUri.[h|c]pp
/src/util/XMLDouble.hpp
/src/util/XMLFloat.hpp
/src/validators/datatype/ListDatatypeValidator.[h|c]pp
Regards,
Peiyong Zhang
____________________________________________
XML Parsers Development
IBM Toronto Laboratory email: [EMAIL PROTECTED]
Phone: (416)448-4088; Fax: (416)448-4414; T/L: 778-4088
Christoffer Dam Bruun <[EMAIL PROTECTED]> on 08/29/2001 11:35:49 AM
Please respond to [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: RE: compilation with inlined desctuctor fails on AIX 4.2, xlC 3 r
ev.1
Hi Peiyong,
Is there a reason why inline is not specified in the class XXX ?
It seems that it would be more safe to just always put "inline" into the
class
declaration instead of reordering the functions.
/Christoffer
Compiler output for the failing files:
xlC_r -qnotempinc -D_THREAD_SAFE -c -O -DXML_USE_NATIVE_TRANSCODER
-DXML_USE_INM
EM_MESSAGELOADER -DAPP_NO_THREADS -DXML_USE_NO_THREADS
-I/home/kfat/nightly/in
clude -o /home/kfat/nightly/obj/AIX/XMLUri.o XMLUri.cpp
"/home/kfat/nightly/include/util/XMLUri.hpp", line 498.29: 1540-241: (S)
"XMLUri
::getScheme() const" was declared with external linkage and called or
defined be
fore being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 498.1: 1540-377: (I)
"XMLUri:
:getScheme() const" is declared on line 152 of
"/home/kfat/nightly/include/util/
XMLUri.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 503.29: 1540-241: (S)
"XMLUri
::getUserInfo() const" was declared with external linkage and called or
defined
before being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 503.1: 1540-377: (I)
"XMLUri:
:getUserInfo() const" is declared on line 159 of
"/home/kfat/nightly/include/uti
l/XMLUri.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 508.29: 1540-241: (S)
"XMLUri
::getHost() const" was declared with external linkage and called or defined
befo
re being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 508.1: 1540-377: (I)
"XMLUri:
:getHost() const" is declared on line 167 of
"/home/kfat/nightly/include/util/XM
LUri.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 518.29: 1540-241: (S)
"XMLUri
::getPath() const" was declared with external linkage and called or defined
befo
re being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 518.1: 1540-377: (I)
"XMLUri:
:getPath() const" is declared on line 182 of
"/home/kfat/nightly/include/util/XM
LUri.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 523.29: 1540-241: (S)
"XMLUri
::getQueryString() const" was declared with external linkage and called or
defin
ed before being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 523.1: 1540-377: (I)
"XMLUri:
:getQueryString() const" is declared on line 191 of
"/home/kfat/nightly/include/
util/XMLUri.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 528.29: 1540-241: (S)
"XMLUri
::getFragment() const" was declared with external linkage and called or
defined
before being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 528.1: 1540-377: (I)
"XMLUri:
:getFragment() const" is declared on line 200 of
"/home/kfat/nightly/include/uti
l/XMLUri.hpp".
gmake[1]: *** [XMLUri.o] Error 1
gmake[1]: Leaving directory `/home/kfat/nightly/src/util'
xlC_r -qnotempinc -D_THREAD_SAFE -c -O -DXML_USE_NATIVE_TRANSCODER
-DXML_USE_INM
EM_MESSAGELOADER -DAPP_NO_THREADS -DXML_USE_NO_THREADS
-I/home/kfat/nightly/in
clude -o /home/kfat/nightly/obj/AIX/XMLScanner2.o XMLScanner2.cpp
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
372.38:
1540-241: (S) "ContentSpecNode::getElement() const" was declared with
external
linkage and called or defined before being declared as inline.
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
372.1:
1540-377: (I) "ContentSpecNode::getElement() const" is declared on line 182
of "
/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp".
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
382.48:
1540-241: (S) "ContentSpecNode::getFirst() const" was declared with
external li
nkage and called or defined before being declared as inline.
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
382.1:
1540-377: (I) "ContentSpecNode::getFirst() const" is declared on line 184
of
"/h
ome/kfat/nightly/include/validators/common/ContentSpecNode.hpp".
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
392.48:
1540-241: (S) "ContentSpecNode::getSecond() const" was declared with
external l
inkage and called or defined before being declared as inline.
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
392.1:
1540-377: (I) "ContentSpecNode::getSecond() const" is declared on line 186
of "/
home/kfat/nightly/include/validators/common/ContentSpecNode.hpp".
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
397.52:
1540-241: (S) "ContentSpecNode::getType() const" was declared with
external
lin
kage and called or defined before being declared as inline.
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
397.1:
1540-377: (I) "ContentSpecNode::getType() const" is declared on line 187 of
"/ho
me/kfat/nightly/include/validators/common/ContentSpecNode.hpp".
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
416.38:
1540-241: (S) "ContentSpecNode::getMinOccurs() const" was declared with
externa
l linkage and called or defined before being declared as inline.
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
416.1:
1540-377: (I) "ContentSpecNode::getMinOccurs() const" is declared on line
190 of
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp".
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
421.38:
1540-241: (S) "ContentSpecNode::getMaxOccurs() const" was declared with
externa
l linkage and called or defined before being declared as inline.
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp", line
421.1:
1540-377: (I) "ContentSpecNode::getMaxOccurs() const" is declared on line
191 of
"/home/kfat/nightly/include/validators/common/ContentSpecNode.hpp".
gmake[1]: *** [XMLScanner2.o] Error 1
gmake[1]: Leaving directory `/home/kfat/nightly/src/internal'
xlC_r -qnotempinc -D_THREAD_SAFE -c -O -DXML_USE_NATIVE_TRANSCODER
-DXML_USE_INM
EM_MESSAGELOADER -DAPP_NO_THREADS -DXML_USE_NO_THREADS
-I/home/kfat/nightly/in
clude -o /home/kfat/nightly/obj/AIX/DatatypeValidatorFactory.o
DatatypeValidato
rFactory.cpp
"/home/kfat/nightly/include/validators/datatype/ListDatatypeValidator.hpp",
line
326.36: 1540-241: (S) "ListDatatypeValidator::setContent(const
XMLCh*const)" wa
s declared with external linkage and called or defined before being
declared
as
inline.
"/home/kfat/nightly/include/validators/datatype/ListDatatypeValidator.hpp",
line
326.1: 1540-377: (I) "ListDatatypeValidator::setContent(const
XMLCh*const)"
is
declared on line 201 of
"/home/kfat/nightly/include/validators/datatype/ListData
typeValidator.hpp".
"/home/kfat/nightly/include/util/XMLDouble.hpp", line 205.24: 1540-241: (S)
"XML
Double::cleanUp()" was declared with external linkage and called or defined
befo
re being declared as inline.
"/home/kfat/nightly/include/util/XMLDouble.hpp", line 205.1: 1540-377: (I)
"XMLD
ouble::cleanUp()" is declared on line 157 of
"/home/kfat/nightly/include/util/XM
LDouble.hpp".
"/home/kfat/nightly/include/util/XMLFloat.hpp", line 195.23: 1540-241: (S)
"XMLF
loat::cleanUp()" was declared with external linkage and called or defined
before
being declared as inline.
"/home/kfat/nightly/include/util/XMLFloat.hpp", line 195.1: 1540-377: (I)
"XMLFl
oat::cleanUp()" is declared on line 152 of
"/home/kfat/nightly/include/util/XMLF
loat.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 498.29: 1540-241: (S)
"XMLUri
::getScheme() const" was declared with external linkage and called or
defined be
fore being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 498.1: 1540-377: (I)
"XMLUri:
:getScheme() const" is declared on line 152 of
"/home/kfat/nightly/include/util/
XMLUri.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 503.29: 1540-241: (S)
"XMLUri
::getUserInfo() const" was declared with external linkage and called or
defined
before being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 503.1: 1540-377: (I)
"XMLUri:
:getUserInfo() const" is declared on line 159 of
"/home/kfat/nightly/include/uti
l/XMLUri.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 508.29: 1540-241: (S)
"XMLUri
::getHost() const" was declared with external linkage and called or defined
befo
re being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 508.1: 1540-377: (I)
"XMLUri:
:getHost() const" is declared on line 167 of
"/home/kfat/nightly/include/util/XM
LUri.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 518.29: 1540-241: (S)
"XMLUri
::getPath() const" was declared with external linkage and called or defined
befo
re being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 518.1: 1540-377: (I)
"XMLUri:
:getPath() const" is declared on line 182 of
"/home/kfat/nightly/include/util/XM
LUri.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 523.29: 1540-241: (S)
"XMLUri
::getQueryString() const" was declared with external linkage and called or
defin
ed before being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 523.1: 1540-377: (I)
"XMLUri:
:getQueryString() const" is declared on line 191 of
"/home/kfat/nightly/include/
util/XMLUri.hpp".
"/home/kfat/nightly/include/util/XMLUri.hpp", line 528.29: 1540-241: (S)
"XMLUri
::getFragment() const" was declared with external linkage and called or
defined
before being declared as inline.
"/home/kfat/nightly/include/util/XMLUri.hpp", line 528.1: 1540-377: (I)
"XMLUri:
:getFragment() const" is declared on line 200 of
"/home/kfat/nightly/include/uti
l/XMLUri.hpp".
gmake[2]: *** [DatatypeValidatorFactory.o] Error 1
gmake[2]: Leaving directory `/home/kfat/nightly/src/validators/datatype'
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 29. august 2001 17:11
> To: [EMAIL PROTECTED]
> Subject: RE: compilation with inlined desctuctor fails on AIX
> 4.2, xlC 3
> r ev.1
>
>
> Christoffer,
>
> Great!
> But for the sake of consistency, we may go with
> the re-order-caller-callee solution, could you send us the
> error message (before you add 'inline' into the class construct)
> on the following files? thanks.
>
> "/home/kfat/nightly/include/util/XMLUri.hpp"
> "/home/kfat/nightly/include/validators/datatype/ListDatatypeVa
> lidator.hpp",
>
> "/home/kfat/nightly/include/util/XMLDouble.hpp",
> "/home/kfat/nightly/include/util/XMLFloat.hpp",
>
>
> Regards,
>
> Peiyong Zhang
> ____________________________________________
> XML Parsers Development
> IBM Toronto Laboratory email: [EMAIL PROTECTED]
> Phone: (416)448-4088; Fax: (416)448-4414; T/L: 778-4088
>
>
>
> Christoffer Dam Bruun <[EMAIL PROTECTED]> on 08/29/2001 10:20:47 AM
>
> Please respond to [EMAIL PROTECTED]
>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> cc:
> Subject: RE: compilation with inlined desctuctor fails on
> AIX 4.2, xlC 3 r
> ev.1
>
>
> Hi,
>
> It works if the inline declaration is made inside the class XXX {...}
> construct.
> We have successfully compiled all the source.
>
> /Christoffer
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: 28. august 2001 23:12
> > To: [EMAIL PROTECTED]
> > Subject: Re: compilation with inlined desctuctor fails on AIX
> > 4.2, xlC 3
> > rev.1
> >
> >
> > Christoffer,
> >
> > In your last mail you mentioned the compilation error on inline
> > function
> > and suggest the two solutions
> >
> > 1) move A::~A() up before A::amethod()
> > 2) not declare A::~A() inline
> >
> > For sure, they work fine for classes with relative simple
> > interdependency
> > among methods, while for more complicated classes it could be
> > a maintenance
> > burden.
> >
> > Could we add the keyword 'inline' to those methods in the
> > class body to
> > notify the compiler that they are inline?
> >
> > class A {
> > A *left, *right;
> > A() {left=0, left=0;};
> > void amethod();
> > ***inline*** ~A();
> > };
> >
> >
> > It your compiler accepts that, it might eliminate the
> > importance of the
> > method order
> > (which is in fact **UNnecessary** to most other compilers),
> could you
> > have a test?
> >
> > Regards,
> >
> > Peiyong Zhang
> > ____________________________________________
> > XML Parsers Development
> > IBM Toronto Laboratory email: [EMAIL PROTECTED]
> > Phone: (416)448-4088; Fax: (416)448-4414; T/L: 778-4088
> >
> >
> >
> > Christoffer Dam Bruun <[EMAIL PROTECTED]> on 08/21/2001 09:03:05 AM
> >
> > Please respond to [EMAIL PROTECTED]
> >
> > To: [EMAIL PROTECTED]
> > cc:
> > Subject: compilation with inlined desctuctor fails on AIX
> > 4.2, xlC 3 rev.1
> >
> >
> > Hi,
> >
> > We are trying to compile Xerces 1.5.1 src on AIX and have run
> > into some
> > compilation problems
> > makefiels generated with:
> > runConfigure -paix -cxlc -xxlC -rnone
> >
> > It appears that xlC will not accept that the following construct:
> >
> > class A {
> > A *left, *right;
> > A() {left=0, left=0;};
> > void amethod();
> > ~A();
> > };
> >
> > inline void A::amethod()
> > {
> > if (right)
> > delete right; // This calls the A destruct'er that is
> > later declared
> > inline
> > }
> >
> > inline A::~A()
> > {
> > if (left)
> > delete left;
> > if (right)
> > delete right;
> > }
> >
> > If one tries to compile:
> >
> > [/home/kfat] xlC -c a.cpp
> > "a.cpp", line 14.11: 1540-241: (S) "A::~A()" was declared
> > with external
> > linkage
> > and called or defined before being declared as inline.
> > "a.cpp", line 14.1: 1540-377: (I) "A::~A()" is declared on line 5 of
> > "a.cpp".
> >
> > Even if we try to compile with "-qnoinline" it still fails
> > with the same
> > error msg.
> >
> > We have found 2 solutions:
> > 1) move A::~A() up before A::amethod()
> > 2) not declare A::~A() inline
> >
> > Know, what has this to do with Xerces :-)
> >
> > We have encountered the above problem in the following files:
> > ContentSpecNode.hpp
> > StringDatatypeValidator.hpp
> > DecimalDatatypeValidator.hpp
> > HexBinaryDatatypeValidator.hpp
> > Base64BinaryDatatypeValidator.hpp
> > NOTATIONDatatypeValidator.hpp
> > QNameDatatypeValidator.hpp
> > ListDatatypeValidator.hpp
> > UnionDatatypeValidator.hpp
> >
> > Are we the only ones having problems compiling on AIX ?
> >
> > Regards
> > Christoffer Bruun
> > email: [EMAIL PROTECTED]
> > tlf: 89432000
> >
> > ---
> > Ed is the standard text editor.
> > If you use ed, you are on the path to redemption, the
> > so-calleds "visual" editors have been placed here by ed to tempt the
> > faithless. DO NOT GIVE IN!!! THE MIGHTY ED HAS SPOKEN!!!
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]