[cfe-dev] Confusing diagnostic for initializing array with array
Eli Friedman
eli.friedman at gmail.com
Thu Feb 7 16:14:53 PST 2008
Testcase:
int test() {
int a[10];
int b[10] = a;
}
gives the following error:
error: incompatible type initializing 'int [10]', expected 'int [10]'
which is completely confusing. This code obviously isn't legal, but
reason has nothing to do with the type of the initializer.
Not sure what the best wording for this error is, though.
-Eli
More information about the cfe-dev
mailing list