Internal compiler error.

Craig Rodrigues rodrigc@mediaone.net
Sat Feb 24 20:58:00 GMT 2001


On Sat, Feb 24, 2001 at 11:45:22PM -0500, Benjamin Scherrey wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I've been fighting this error for a while and have gotten it down to a 
> relatively small sample. The attached code causes an internal compiler error 
> in g++ 2.95.2 under both x86 Linux 2.4.1-ac18 ( binutils 2.10.x ). and 
> CygwinNT 1.1.7. It compiles and runs as expected under Borland C++ for NT. Is 
> this a known bug? Is there a work-around for this? I'm really stuck here 
> cause Windows ain't my target environment! :-(
> 
> 	thanx & later,
> 
> 		Ben Scherrey

I tried compiling your example with a snapshot of gcc
from http://www.codesourcery.com/gcc-snapshots/
% gcc -v
gcc version 3.0 20010223 (prerelease)

% gcc Any.cpp
% ./a.out

const char* Any ctor: s = First try.
const char* Any ctor: s = I'm a string!.
Ss Any ctor: z = I'm a string!.
i Any ctor: z = 42.
Ss Any ctor: z = I'm a string!.        

I'm not sure what the workaround for gcc 2.95.2 would be.
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@mediaone.net          



More information about the Gcc mailing list