delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/11/17/05:27:39

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199911171027.FAA19044@pinball-wizard.mit.edu>
From: geoff schmidt <gschmidt AT mit DOT edu>
reply-to: gschmidt AT mit DOT edu
To: cygwin AT sourceware DOT cygnus DOT com
Subject: gcc bug relating to __declspec(dllimport)?
Date: Wed, 17 Nov 1999 05:27:34 EST

Hi!

With gcc 2.95.2 targeting mingw32 from linux, this code:

/*--- xyz.cpp ---------------------------------------------------------------*/
#include "xyz.h"

#pragma implementation "foo"
#pragma interface "foo"

class two: public one {};

/*--- xyz.h -----------------------------------------------------------------*/
#pragma interface "bar"

class __declspec(dllimport) one {
 public:
  // virtual ~one(void); // see note
  virtual void func(void);
} ;

/*---------------------------------------------------------------------------*/

gets me:

$ gcc xyz.cpp
xyz.cpp:6: Internal compiler error, output_operand_lossage `invalid
expression as operand'

If I use -fno-rtti, I have to uncomment the virtual destructor to get
the same behavior.

I know that this error message has come up on the list before, but I'm
pretty sure that this instance is an actual bug and not a result of
trying to do things that are impossible with imported DLL data -- 
because the above code is a snippet from the wxWindows cross-platform
GUI library, which compiles happily under several different windows
compilers.  Or am I missing something obvious?

Am I doing something wrong?  Is there a way to work around this?  If
it's a bug, I'd be willing to take a stab at a patch if someone can
point me in the right direction.

thanks very much,

geoff schmidt
gschmidt AT mit DOT edu

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019