Re: [PATCH][RFC] kernel.h: provide array iterator

From: Alexey Dobriyan
Date: Fri Mar 16 2018 - 16:04:17 EST


Proper form for iteration over an array is below:

int a[] = {1, 2, 3, 5};
for (int x: a) {
...
}

Your macro forces an iterator to be pointer which is uh-oh.