ID Number: Q30456
5.10
MS-DOS
buglist5.10 fixlist6.00
Summary:
The C version 5.10 compiler will incorrectly generate the following
error when the sample code below is compiled:
C2166 -'lvalue specifies 'const' object'
The error is generated for the assignment of the array address. This
process should be allowed because the pointer is not const.
Microsoft has confirmed this to be a problem in C version 5.10. This
problem was corrected in C version 6.00.
Sample Code
-----------
int arr[3];
int const (*pa3)[3] = &arr;
void main(void)
{
pa3 = &arr; /* This should be allowed and is not. */
}