Arguments out of order error

Hi all,

With Sun Studio 10 we get "arguments out of order error" which we don't get with any other comiler or Sun Studio 11. The error is as below:

"/build/builds/bczar/Studio/ACE_wrappers/TAO/tao/BD_String_Argument_T.inl", line

14: Error: Arguments out of order for TAO::In_BD_String_Argument_T<S_var, BOUND

, Insert_Policy><struct>>;

The template definition is:

template<typename S_var,

size_t BOUND,

template ><typename> class Insert_Policy>

class In_BD_String_SArgument_T : public InArgument

{

public:

In_BD_String_SArgument_T (void);

virtual CORBA::Boolean demarshal (TAO_InputCDR &);

#if TAO_HAS_INTERCEPTORS == 1

virtual void interceptor_value (CORBA::Any *any) const;

#endif /* TAO_HAS_INTERCEPTORS == 1 */

const typename S_var::s_traits::char_type * arg (void) const;

private:

S_var x_;

};

The template method itself is:

template<typename S_var,

size_t BOUND,

template ><typename> class Insert_Policy>

ACE_INLINE

TAO::In_BD_String_SArgument_T<S_var,BOUND,Insert_Policy>::

In_BD_String_SArgument_T (void)

{}

Any one ideas? We can deliver a preprocessor output of the code if needed.

[1336 byte] By [JohnnyWillemsenRemedy] at [2007-11-26 8:17:01]
# 1

That sounds like a bug in Studio 10 that apparently was fixed in Studio 11. Can you use Studio 11 instead?

If you must use Studio 10, have you upgraded to all the latest patches? You can get them here:

http://developers.sun.com/prodtech/cc/downloads/patches/index.jsp

If getting the latest paches doesn't fix the problem, you can file a bug report.

You would need to provide a test case that demonstrates the problem. Maybe you can strip down your code to something simple.

If you have a service contract with Sun, contact your Sun Service representative. You will be able to track progress on fixing the bug, and get a pre-release version of the patch.

If you don't have a service contract, you can post the test case here if it is not too big, or you can file a bug report via bugs.sun.com. Information on how to do that was posted here:

http://forum.sun.com/jive/thread.jspa?threadID=99337

clamage45 at 2007-7-6 21:17:05 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
I can confirm this doesn't happen with studio 11 but we have users who are usig studio 10 and they can't just upgrade. Installed already the latest patches but that didn't help.
JohnnyWillemsenRemedy at 2007-7-6 21:17:05 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
Can you post a small example that compiles with Studio 11 but fails with this error message using Studio 10?
clamage45 at 2007-7-6 21:17:05 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
At this moment I am swamped with other errors that need fixing, I just can't guarantee that I have an example soon but I do have a preprocessor output which can be compiled and reproduces the problem.
JohnnyWillemsenRemedy at 2007-7-6 21:17:05 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5

Is there a way that I can send you or another sun engineer the preprocessor output, that really should be enough to tacke this. It is 976 Kb of size. The code that the error is given about is:

template < typename S_var ,

size_t BOUND ,

template < typename > class Insert_Policy >

class In_BD_String_Argument_T : public InArgument

{

public :

In_BD_String_Argument_T ( const typename S_var :: s_traits :: char_type * x ) ;

virtual CORBA :: Boolean marshal ( TAO_OutputCDR & cdr ) ;

virtual void interceptor_value ( CORBA :: Any * any ) const ;

typename S_var :: s_traits :: char_type const * arg ( void ) const ;

private :

typename S_var :: s_traits :: char_type const * x_ ;

} ;

template < typename S_var ,

size_t BOUND ,

template < typename > class Insert_Policy >

TAO :: In_BD_String_Argument_T < S_var , BOUND , Insert_Policy > :: In_BD_String_Argument_T (

const typename S_var :: s_traits :: char_type * x

)

: x_ ( x )

{ }

JohnnyWillemsenRemedy at 2007-7-6 21:17:05 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 6
I see that you have filed this problem at bugs.sun.com.A support engineer will contact you about sending in the preprocessed file.
clamage45 at 2007-7-6 21:17:05 > top of Java-index,Development Tools,Solaris and Linux Development Tools...