delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/29/17:25:55

Date: Sun, 29 Mar 1998 14:23:36 -0800 (PST)
Message-Id: <199803292223.OAA18981@adit.ap.net>
Mime-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>,
Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: NULL redefined! :(
Cc: DJ Delorie <dj AT delorie DOT com>, djgpp-workers AT delorie DOT com

At 01:25  3/29/1998 +0300, Eli Zaretskii wrote:
>
>On Fri, 27 Mar 1998, Vik Heyndrickx wrote:
>
>> > Yes.  It's a good reason to fix the C++ library.  
>> 
>> It isn't broken.
>> It only defines NULL when no included library defines NULL. When this
>> header inclusion comes before the standard header inclusion, that
>> standard header (here <stdlib.h>) will redefine NULL with of course a
>> definition of its own, and this will produce this compiler warning. Only
>> putting that standard header before the third party header will us get
>> rid of that warning, since the third party header won't redefine NULL in
>> this case.
>
>IMHO, it is not nice to tell people to put their headers in some
>particular order.  I think we will be flooded by messages which refer
>to this problem if it doesn't get fixed somehow.  If the concensus is
>that we want libstdc++ maintainers to fix their headers, let us
>complain to them, the sooner the better.

Or, as the path of least resistance, would it really be so hard for DJGPP to
change? I know it's against principles and all that, but would it kill us to
surround each `#define NULL 0' with `#ifndef NULL'?

>However, if nobody else cares, I'm willing to drop the subject, as I
>don't use C++ too much.

Same here.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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