cvs commit: src/sys/amd64/include md_var.h
Craig Rodrigues
rodrigc at crodrigues.org
Thu Jan 18 05:28:26 UTC 2007
On Wed, Jan 17, 2007 at 09:43:45PM -0500, Alexander Kabaev wrote:
> Back this out please. I do not see how this change can possibly be
> correct.
For this testcase:
void main(void)
{
extern struct foo array_foo[];
return 0;
}
GCC3 will compile this testcase without error, but GCC4
will complain with: error: "array type has incomplete element type".
Two ways to eliminate this GCC4 compilation error:
(1) Change testcase to:
int main(void)
{
extern struct foo *array_foo;
return 0;
}
(2) Make struct definition visible earlier on:
#include "foo.h" /* where foo.h contains: struct foo { int a; }; */
int main(void)
{
extern struct foo array_foo[];
return 0;
}
For md_var.h, I chose approach (1). Do recommend approach (2),
or some other fix?
--
Craig Rodrigues
rodrigc at crodrigues.org
More information about the cvs-src
mailing list