lkml.org 
[lkml]   [2004]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Being more anal about iospace accesses..
Linus Torvalds writes:
>
>
> On Wed, 15 Sep 2004, JЖrn Engel wrote:
> >
> > C now supports pointer arithmetic with void*?
>
> C doesn't. gcc does. It's a documented extension, and it acts like if it
> was done on a byte.
>
> See gcc's user guide "Extension to the C Language Family".
>
> It's a singularly good feature.

Unfortunately it breaks even better identity

foo *p;

p + nr == (foo *)((char *)p + nr * sizeof *p)

unless one thinks that is --together with gcc-- that nothing occupies
exactly one byte.

>
> Linus

Nikita.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2011 Jasper Spaans