www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/11/11:26:46

Message-Id: <m0yCie4-000S2iC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Jerzy Witkowski <Jerzy DOT Witkowski AT ii DOT uni DOT wroc DOT pl>, djgpp AT delorie DOT com
Date: Wed, 11 Mar 1998 13:23:35 +0000
MIME-Version: 1.0
Subject: Re: Bugs in 2.8.0?
In-reply-to: <x64t15pbte.fsf@ii.uni.wroc.pl>

Jerzy Witkowski <Jerzy DOT Witkowski AT ii DOT uni DOT wroc DOT pl> wrote:

> When recompiling my current C++ programs with new 2.8.0 gpp I
> found two differences, probably bugs.
> 
> First (minor one): when including <vector.h> 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 <iostream.h>
> 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

- Raw text -


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