Menu

#11 Array to Typedef Not Handled Properly

open
nobody
5
2006-06-17
2006-06-17
Anonymous
No

If I create a typedef as follows:

typedef LONG CONN_ARRAY[CONN_ARRAY_SIZE];

And then use something like this in the code:

static CONN_ARRAY connArray;
.
.
.

if (connArray[i] == -i)

I get the following message when I try to compile the
jekyll source back to C:

$ jekyll --j2c swt.jkl
-------------------------------------------------------------------------------
File swt.jkl : 434 characters 9 - 19
fatal error: Type static CONN_ARRAY is not of pointer
or array type
if (conArray[i] == -1)
^^^^^^^^^^^
-------------------------------------------------------------------------------

It compiles fine under gcc, before converting to jekyll.

Discussion


Log in to post a comment.