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]
Other format: [Raw text]

Re: Bootstrap failures due to C++ warnings with --enable-gather-detailed-memory-stats


On Mon, Jul 7, 2008 at 4:48 AM, Dave Korn <dave.korn@artimi.com> wrote:
> Kaveh R. GHAZI wrote on 06 July 2008 23:36:
>
>>       * gcc.c (execute): Fix -Wc++-compat warning.
>
>
>  Kaveh, am I right in inferring from recent list traffic that you've taken
> on a whole load of c-vs-c++ compatibility work?  If so, have you seen / can
> you take a look at http://gcc.gnu.org/ml/gcc/2008-07/msg00109.html (and the
> follow-up http://gcc.gnu.org/ml/gcc/2008-07/msg00130.html) ?

The idiom is to use  XCNEWVAR(T) for xcalloc(1, sizeof(T)),
XNEWVAR(T) for xmalloc(sizeof(T)), XNEWVEC(T,n) for xmalloc(n * sizeof(T)),
and XCNEWVEC(T,n) for xcalloc(n,sizeof(T)).  You don't need to add
explicit casts -- those are taken care of by the allocation macros.


>
>
>
>    cheers,
>      DaveK
> --
> Can't think of a witty .sigline today....
>
>


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