Subject: Re: gcc-win32 b17.1 cc1plus err 1121 - What does it mean?
From: [email-masked] (Gunther Ebert)

27 Feb 1997 01:20:38 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <Pine.SOL.3.91.970226103906.5621C-100000@westmain>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.01Gold (WinNT; I)
Original-To: Jonathan Lanier <[email-masked]>
Original-Cc: [email-masked]
Original-Sender: [email-masked]

Hi,

I ran into the same problem (with own code) and I found out that
you have to care about two cases:

- pointers to class member functions. You can only use
  
  class anyclass {
     public: int foo(params);
  };
  typedef int (anyclass::*memberfunc)(params);
  memberfunc *ptr_to_member = (memberfunc) &anyclass::foo;

  Not that the ampersand character which is taking the address
  of the actual function is highly important. Without supplying
  this operator gcc behaves like you described.

- mismatch of const/non-const references. 
  class anyclass {
     public:
        int foo();  // non-const function
  };

  void bar(const anyclass &r)
  {
      r.foo();
  }

  This construct seems to result in the same gcc behaviour, but this
  is just my guess, I'm not absolutely sure.
  
BTW, it doesn't matter if you are using the Cygnus C library or the
mingw32 one. The gcc behaviour is the same with both.  
BTW 2, the 1121 number is not an error code of cc1plus but it is just
the process id of cc1plus.

Hope this helps,
Gunther

Jonathan Lanier wrote:
> 
> I've just now subscribed to the GCC-Win32 mailing list and haven't
> actually received anything from it yet, so please bear with me if I'm
> re-posting something old, or if I'm not posting in the correct format.
> I'm in a bit of a hurry...
> 
> Please don't consider this a bug report, because I don't even know if
> this is a problem with the compiler, but I have a rather complex program
> (true C++, with template classes, etc.) that GCC for Win32 doesn't like.
> 
> I'm attempting to compile with b17.1 under Win95, and the compiler
> keeps hanging in an infinite loop, printing '(..[path to
> compiler]\cc1plus.exe 1121): In cygwin_except_handler' and scrolls away,
> forever, whenever I try to compile this module...
> 
> I checked all the FAQs, the READMEs, and anything else I could get my
> hands on but I have no list of internal Cygnus compiler error messages.
> I'm on a 64MB system with plenty of hard drive space.  I can compile
> with the -E switch (preprocess) and get a .ii file just fine, so I know
> that the problem is not in the preprocessor.  But any attempts to compile
> the .ii file result in the same infinite loop.
> 
> Am I overflowing some internal table limit, or stack limit, of GCC?  I'm
> using the b17.1 binaries downloaded from the Cygnus web site.  Any help
> at all would be most humbly appreciated, especially if anyone out there
> knows what this error message means.  If I'm running out of stack space,
> or something, is there any way to fix this?  I'd hate to have to rebuild
> from source but I wouldn't mind doing it if it was necessary.
> 
> If it's relevant, I'm making a native Win32 app (no cygwin DLL) with the
> minimalist GCC-Win32 include files/libs/startup code.
> 
> - Jonathan Lanier
>   [email-masked]
> -
> For help on using this list, send a message to
> "[email-masked]" with one line of text: "help".

-- 

Gunther Ebert
iXOS Anwendungs-Software GmbH
Angerstrasse 40-42
D-04177 Leipzig

Phone : +49 341 48503-0
Fax   : +49 341 48503-99
E-mail: mailto:[email-masked]
www   : http://www.ixos-leipzig.de
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".