This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Those obnoxious "mktemp is not safe" warnings


On Wed, Mar 21, 2001 at 02:57:11PM -0500, DJ Delorie wrote:
> 
> > Index: include/ansidecl.h
> > --- include/ansidecl.h	2001/03/14 19:44:38	1.8
> > +++ include/ansidecl.h	2001/03/21 19:33:58
> > @@ -161,6 +161,8 @@ Foundation, Inc., 59 Temple Place - Suit
> >  
> >  #endif	/* ANSI C.  */
> >  
> > +/* GCC source code likes typed null pointers for some odd reason.  */
> > +#define NULL_PTR ((PTR) 0)
> 
> libiberty is used in more than just gcc.  Is this gcc-specific?  If
> so, it probably shouldn't go here, unless there really isn't a good
> place to put it in gcc and it won't conflict with other packages.

It is gcc specific.  There isn't a good place to put it in gcc short
of keeping gansidecl.h around (NULL_PTR may be used in headers
included by config.h, before system.h fires).  I doubt it will affect
any other package; NULL_PTR is unlikely to be used with some other
meaning.

My personal opinion is that we should globally replace all uses of
NULL_* in the gcc sources with either plain NULL, or 0.  Now
everything is properly prototyped, they aren't necessary anymore, and
they are not used consistently so they confuse people.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]