Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: Jerzy Witkowski , djgpp AT delorie DOT com Date: Wed, 11 Mar 1998 13:23:35 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Bugs in 2.8.0? In-reply-to: Precedence: bulk Jerzy Witkowski wrote: > When recompiling my current C++ programs with new 2.8.0 gpp I > found two differences, probably bugs. > > First (minor one): when including with -Wall option, > compiler warns about symbol NULL defined twice: in string.h and > libio.h files. That's not a bug in gcc 2.8.0, that's a bug in DJGPP's libc. Robert and I found it, but we don't decided who will report it ;-). The problem is that DJGPP defines NULL in tons of places, that worked with 2.7.2 because the C++ library defined NULL similar to libc, but now 2.8.0 uses a special type (something like __null) and hence the redefinition is invalid. To work around that just correct your libc headers to make: #ifndef NULL ... current definition ... #endif > Second, rather serious: exceptions cannot be caught. The > following program: > > #include > int main (void) { > try { throw (int)5; } > catch (int) { cout << "catch" << endl; } > return 0; > } > > produces output "catch" with 2.7.2.1 and output "Abort!" > (incorrect, I think) with new 2.8.0 version. > > Is this something specific to DJGPP or to gcc 2.8.0 in general? I can't help you here because I don't know how it works I can only tell you that the fact is the reverse: Now in 2.8.0 exceptions works like the C++ standard says and hence some specific switch (like the RTTI switch) are enabled by default. Please read the news from 2.8.0 and the 2.8.0 manuals. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://set-soft.home.ml.org/ or http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013