This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
size of array "" is too large
- From: Hariharan <hariharans at picochip dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 17 Jul 2008 11:39:37 +0100
- Subject: size of array "" is too large
Hello,
I see that in x86 GCC, you can define a structure with
struct trial
{
long a[1000000000];
};
Whereas in a 16-bit target (picochip), you cannot define,
struct trial
{
long a[10000];
};
In the case above, i get a
"size of array ‘a’ is too large" error.
The thing that took me by surprise was, if i split the structure to
struct trial
{
long a[5000];
long b[5000];
};
This works fine.
I looked around the mailing list a bit. This issue seems to have been
raised a few times before, but i couldnt find any definitive answer.
Is this a bug in GCC? Do i file a report?
Cheers
Hari