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/ListDatatypeValidator.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]

Reply via email to