This is the mail archive of the gcc@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: Compiling GCC with g++: a report


On May 24, 2005, at 9:43 AM, Joe Buck wrote:
On Tue, May 24, 2005 at 05:03:27PM +0200, Andreas Schwab wrote:
Paul Koning <pkoning@equallogic.com> writes:
I hope that doesn't require (void *) casts for pointer arguments
passed to the likes of memcpy...

Only the (void*) -> (any*) direction requires a cast in C++, the other direction is still converted implicitly.

For this reason, I always cast the result of malloc to the proper type; it just feels wrong otherwise.

Yes, if the cast looks odd to you, you probably don't go back far enough.
I've certainly used compilers that warned when you didn't have a cast there.



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