[Ace-users] Problem in the generation of stubs with forward declared interfaces.

Stefano Delli Ponti stefano.delliponti at gmail.com
Fri Aug 10 07:58:49 CDT 2007


    ACE VERSION: 5.5.10

   HOST MACHINE and OPERATING SYSTEM:
      Dell, Windows XP

   COMPILER NAME AND VERSION (AND PATCHLEVEL):
      Visual Studio 2005 SP1, Visual C++ 8

    THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
    specific file, simply state which one]:
       #if defined FD_SETSIZE
       #	undef FD_SETSIZE
       #endif
       #define FD_SETSIZE 4096
       #define ACE_HAS_STANDARD_CPP_LIBRARY 1
       #include "ace/config-win32.h"

    AREA/CLASS/EXAMPLE AFFECTED:
     TAO_IDL

    DOES THE PROBLEM AFFECT:
        COMPILATION? Yes

    SYNOPSIS:
     Problem in the generation of stubs with forward declared
interfaces referred in re-opened modules.

    DESCRIPTION:

      TAO_IDL generates wrong stubs when interfaces are forward
declared in a module and referred in                    the same re-
opened module, before the interface has been defined.

    REPEAT BY:

     Use the TAO_IDL compiler with this idl file:

     // test.idl

     module Test
     {
	     interface A;
     };

     module Test
     {
	     struct B
        	{
	        	A an_a;
        	};
     };

     This generates among the other things:

       return
         Test::TAO::Objref_Traits<Test::A>::marshal (
             _tao_aggregate.an_a.in (), strm);


      The problem verifies also if the forward declaration is in
another file, included in this one.

    SAMPLE FIX/WORKAROUND:

      Repeat the forward declaration in the re-opened module.


Best regards,

Stefano



More information about the Ace-users mailing list