This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Fwd: EGCS/G++ bug]





Ruslan,

   Here's the test case that shows the bug in egcs/g++.  It seems
that egcs/g++ doesn't like forward declarations of operators inside
of nested classes.

   Right now, it still includes stream_dll.h, but it should be
easy to clean this up further...

Regards,
Jerome
#include "stream_dll.h"

class idlio {
public:
  class _STREAMS_STUB_C_API Stream;
  typedef Stream* Stream_ptr;
  typedef Stream_ptr StreamRef;


  _STREAMS_STUB_C_API friend VISistream& operator>>(VISistream&, Stream_ptr&);

  _STREAMS_STUB_C_API friend VISostream& operator<<(VISostream&, const Stream_ptr);
  _STREAMS_STUB_C_API friend CORBA::Boolean operator>>=(const CORBA::Any&, Stream_ptr&);
  _STREAMS_STUB_C_API friend void operator<<=(CORBA::Any&, const Stream_ptr);

///////////////////////////////////////////////////////

  class _STREAMS_STUB_C_API Stream : public virtual CORBA_Object {
  private:
    static const CORBA::TypeInfo _class_info;
    Stream(const Stream&) {}
    void operator=(const Stream&){}

  public:

    static  const CORBA::TypeInfo *_desc();
    virtual const CORBA::TypeInfo *_type_info() const;
    virtual void *_safe_narrow(const CORBA::TypeInfo& ) const;
    static CORBA::Object *_factory();

    _STREAMS_STUB_C_API friend VISistream& operator>>(VISistream& _strm, Stream_ptr& _obj) {
      CORBA::Object_var _var_obj(_obj);
      _var_obj = CORBA::Object::_read(_strm, Stream::_desc());
      return _strm;
    }
  };

};

/**
 **************************************************************************
 *                                                                        *
 *                        -- DO NOT MODIFY --                             *
 *  This file is automatically generated by the VisiBroker IDL compiler.  *
 *  Generated code conforms to OMG's IDL-to-C++ 1.1 mapping as specified  *
 *  in OMG Document Number: 96-01-13                                      *
 *                                                                        *
 *  VisiBroker is copyrighted by Visigenic Software, Inc.                 *
 **************************************************************************
 */

#include "stream_c.hh"

#ifndef _STREAMS_STUB_DLL_H
#define _STREAMS_STUB_DLL_H

#include <corba.h>

#if defined(XP_PC)
#ifdef BUILD_STREAMS_STUB_C_DLL
#define _STREAMS_STUB_C_API		_declspec(dllexport)
#else
#define _STREAMS_STUB_C_API		_declspec(dllimport)
#endif
#else
#define _STREAMS_STUB_C_API
#endif

#if defined(XP_PC)
#ifdef BUILD_STREAMS_STUB_S_DLL
#define _STREAMS_STUB_S_API		_declspec(dllexport)
#else
#define _STREAMS_STUB_S_API		_declspec(dllimport)
#endif
#else
#define _STREAMS_STUB_S_API
#endif

#endif // _STREAMS_STUB_DLL_H


S/MIME Cryptographic Signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]