Messages in this thread | | | Date | Wed, 15 Sep 2004 11:09:08 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: Being more anal about iospace accesses.. |
| |
On Wed, 15 Sep 2004, Nikita Danilov wrote: > > Unfortunately it breaks even better identity > > foo *p; > > p + nr == (foo *)((char *)p + nr * sizeof *p)
No, gcc allows the above, by making sizeof(void) be 1.
And sane compilers would just inform the user at compile-time with a nice readable message that he's doing something stupid.
Linus - 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/
| |