Date: Wed, 15 Jan 1997 13:21:26 +0200 (IST) From: Eli Zaretskii To: Adam DiCarlo cc: djgpp AT delorie DOT com Subject: Re: GCC saying, "Abort!" In-Reply-To: <01bc023e$b528a920$9b68d9ce@#bikko> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.