[omniORB] Strange code produced by omniidl2

Nick Brook ncb@adaptivebroadband.com
Wed, 07 Jul 1999 10:49:13 +0100


I'm having a problem with forward declarations. Basically I have the
following two idl files:

weird.idl:

#ifndef _weird_idl_
#define _weird_idl_

#include "odd.idl"

module bs
{
    interface node;
};

module ap
{
    interface node 
    {
        bs::node get_node();
    };
};

#endif 

and

odd.idl:

#ifndef _odd_idl_
#define _odd_idl_

module ap 
{
    interface node;
};

module su
{
    interface node
    {
        string get_name();
    };
};

#endif // _su_idl_


Now the weird thing is that if you look at weird.hh the forward
declaration for the bs module is at THE END of the file (which isn't
much use in a forward declaration!). Stranger still, the ap module is at
the start of the file for odd.hh, where it should be.

This looks like a bug in omniidl2. Any ideas?

Cheers, 
	Nick Brook
	AdaptiveBroadband Ltd,
	Cambridge
	UK