This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++-compat clean build


> We have several uses of these macros already in the tree.
> They seem to have the advantage that they hide the casts and perhaps
> make the intention of the code clearer while we can't use new/new[].
> E.g., XNEW prevents errors of the type:
> 
>  struct foo *f = (struct foo *) xmalloc (sizeof (f));
> 
> We already use these macros in gdb in several places.
> Not sure what people feel about using them more?

FWIW, I have no real strong opinion. If the casts become necessary,
and they allow us to hide them, I think they indeed would be useful.

-- 
Joel


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