Help Required - compilation error.

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

 



Hi,

I used GCC 2.7.2.3 in the past to compile the following code:
class sample
{
private:
unsigned char wk_tmp[20000 - ((int)(long)&(((DATASTRUCTURE*)0)->mydata))];

};


Now, When i try to compile using GCC 4.1.2, I get the following error for the above declaration.
error: array bound is not an integer constant


I see that  the array size has to be mentioned directly, instead of dynamic calculation.
Is there any workaround for this. Do I need to turn on any flag in gcc/g++ when compiling this file.


Thanks in advance.

Regards
Jalaiah. M



[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