delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/02/27/18:32:06

From: jonathan AT westwood DOT com (Jonathan Lanier)
Subject: Re: gcc-win32 b17.1 cc1plus err 1121 - What does it mean?
27 Feb 1997 18:32:06 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.SOL.3.91.970227103957.725A-100000.cygnus.gnu-win32@westmain>
Mime-Version: 1.0
Original-To: Win32 Mailing List <gnu-win32 AT cygnus DOT com>
In-Reply-To: <3315392B.BA2@ixos-leipzig.de>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

> - 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.

This is very interesting, considering that a function call to a method 
that could change the object's state on a const object should just print an 
error at compile time and bail.  I can't believe this would happen on all 
versions of GCC; 2.7.2 has been around quite awile, I would have thought 
someone would have caught that.  Maybe it's specific to the Win32 port?

> 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.

Wasn't sure how much headers (pragmas, etc.) could change the behavior of 
the compile; frankly I haven't looked at them very closely so I just 
thought I'd post it in case it helped...

Thanks for the info: at least I know two other things to look for now... 
:-)  See my other post yesterday for yet another way to crash it.

- Jonathan Lanier
  jonathan AT westwood DOT com
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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