www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/15/06:27:58

Date: Wed, 15 Jan 1997 13:21:26 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Adam DiCarlo <bikko AT ix DOT netcom DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: GCC saying, "Abort!"
In-Reply-To: <01bc023e$b528a920$9b68d9ce@#bikko>
Message-ID: <Pine.SUN.3.91.970115131242.15171B-100000@is>
MIME-Version: 1.0

On 14 Jan 1997, Adam DiCarlo wrote:

> I've got a project I've been working on for a while, (in RHIDE), and now
> when I compile it, when the compiler compiles "text.cc", it screams,
> "Abort!", and nothing else.

This line is the culprit:

    char sz[uMaxLength] = ""; // start terminated

If you delete the initialization with "", it passes.  I don't know enough 
C++ to tell whether this is a bug in GCC (in which case please report it 
to GCC bug-reporting mailing list bug-gcc AT prep DOT ai DOT mit DOT edu) or in your 
program.

Note that the DJGPP FAQ list suggest to use the -Q switch to gcc and the 
#if 0 ... #endif method to zero on the fragment which causes such 
problems (see section 6.3 of the FAQ); that is how I was able to find the 
above line in about 10 minutes.

> There may be something wrong with my source, but I don't think *anything*
> that's wrong with it should make the compiler do this.

I disagree.  It all depends on how much does the offending code deviate 
from correct C++.  Ever tried to feed a C compiler with a Pascal source?  
If not, I suggest you do: it's an educational experience.

- Raw text -


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