This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA] Fix gdb/277 by separating types



On Sun, 12 May 2002, Daniel Jacobowitz wrote:

> This patch requires my previous cleanup patch.  It fixes a test in
> gdb.c++/method.exp for GCC 3.x/stabs+, and closes gdb/277.

A minor comment about style:

>        type = (struct type *) xmalloc (sizeof (struct type));
> +      memset ((char *) (type), 0, sizeof (struct type));

Why the cast to `char *' in the first argument of memset?  I thought, 
since we require an ISO C compiler, we shouldn't need those anymore.
(There are more casts like that in the patch.)

The same goes for casting the return value of xmalloc, I think.


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