www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/27/05:45:17

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help... classes and optimization problem
Date: Sun, 27 May 2001 10:06:27 +0100
Lines: 20
Message-ID: <7tf1htc7im4vmtto3ve7eqmmjs6frns4ue@4ax.com>
References: <k1BP6.1409$vu4 DOT 130732 AT news3 DOT oke DOT nextra DOT no>
NNTP-Posting-Host: modem-63.erythromycin.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: news6.svr.pol.co.uk 990954378 3001 62.136.93.63 (27 May 2001 09:06:18 GMT)
NNTP-Posting-Date: 27 May 2001 09:06:18 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Agent 1.7/32.534
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Vermin" <ratspl AT hotmail DOT com> wrote:

> OK...there might be somer errors there, but I hope you get the point... So
> when I use the class in the following way, everything works fine:
> 
> something s;
> s.HandleString("Angel!");
> 
> ..but I get a "general protection fault" error when I use the following
> code:
> 
> something s("Angel!");
> 
> ..and this is only when optimization is turned on (-O2 or -O3). What might
> be wrong? Any suggestions?

What happens if you do:

  char str[256] = "Angel!";
  something s (str);

- Raw text -


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