The following compiles fine in Visual Studio and is something that I do often:
int a = 0; int b = 0;
int* ptrs[2]; ptrs[0] = &a; ptrs[1] = &b;
This same code complains that "the size of an array must be greater than zero" in IAR.
Anyone know what I should do? Is there a switch somewhere that I need to flip in the options?
Is this "bad" code, seems fine and legal to me.
Hope someone can help, Steve