This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Refactor malloc (x * sizeof (t) to XNMALLOC (x, t).
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 31 Oct 2013 20:28:52 -0700
- Subject: Re: [PATCH] Refactor malloc (x * sizeof (t) to XNMALLOC (x, t).
- Authentication-results: sourceware.org; auth=none
- References: <20131031164614 dot GA28117 at domone dot podge> <5272C4B7 dot 10104 at cs dot ucla dot edu> <20131031214250 dot GA31937 at domone dot podge>
OndÅej BÃlka wrote:
> A macro saves cast in more cases than adding cast to change type.
I don't see how that would be, as no casts are necessary with the function.
> Second reason that I picked macro was because I assumed that gcc does
> not inline functions with inline assembly. A gcc does it which changes
> situation a bit.
GCC normally inlines such functions these days, so the situation is
indeed different than it was way back when.