Strange const warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The test.c file below gives a warning "passing arg 1 of `test' from
incompatible pointer type", why is this?  I'm using gcc 3.4.2.

#include "stdio.h"

void test(const int a[1][1])
{
	printf("%d\n", a[0][0]);
}

int main()
{
	int a[1][1] = {{0}};
	test(a);
	return 0;
}

Jon


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux