Re: Question about void pointers
- From: Ben Pfaff <blp@xxxxxxxxxxxxxxx>
- Date: Tue, 16 Sep 2008 10:33:09 -0700
vippstar@xxxxxxxxx writes:
You have two options, do it portably, or do it with an extension, with
absolutely no loss in efficiency or size, and you advice to choose the
extension.
I admit that, occasionally, I've used pointer arithmetic on void
* in cases where GCC is the only compiler that matters. (Code
inside the Linux kernel is one example.) The nice thing about
doing it that way is that it avoids having to insert additional
casts, which are ugly.
I wouldn't do it in a place where portability matters.
--
"To get the best out of this book, I strongly recommend that you read it."
--Richard Heathfield
.
- References:
- Question about void pointers
- From: raphfrk
- Re: Question about void pointers
- From: vippstar
- Re: Question about void pointers
- From: raphfrk
- Re: Question about void pointers
- From: s0suk3
- Re: Question about void pointers
- From: vippstar
- Question about void pointers
- Prev by Date: Re: short circuit evaluation
- Next by Date: Re: Question about void pointers
- Previous by thread: Re: Question about void pointers
- Next by thread: Re: Question about void pointers
- Index(es):
Relevant Pages
|