There are two arrays in my projects. One is of static const type which contain more or less entries on different projects, like
static const array_A[] = { ... };
I do not like the style of array_A[N] = { ... }
since I do not want to count the length of array manually.
There is another array B whose length is required to be the same as A.
Some compiler (such as armcc) support the following trick
const int N = sizeof(array_A) / sizeof(array_A[0])
static const array_B[N];
But this trick fails with gcc compiler. So is there any other easy way ?