A
arcadio
Hi everyone,
I'm currently struggling to compile a large piece of legacy code. GCC
3.3 compiles it without complaining, but GCC 4.2.3 (the default in
Debian) refuses it and signals "several array has incomplete element
type" errors.
I know that since 4.0 or so, GCC is less forgiving and does not accept
any arrays of incomplete type (see http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html).
However, I cannot see where the array types are incomplete here:
/* From the header */
void grphcs_enhnc_outsquare(unsigned char [][], const int, const int,
const int, const int y);
/* From the source: ERROR: Array type has incomplete element type */
void grphcs_enhnc_outsquare(unsigned char outsquare[][], const int w,
const int h, const int x, const int y)
{ /* ... */ }
/* From another header */
extern void bz_comp(int, int [], int [], int [], int *, int [][], int
*[]);
/* From the corresponding source: ERROR: Array type has incomplete
element type */
void bz_comp(
int npoints,
int xcol[ MAX_BOZORTH_MINUTIAE ],
int ycol[ MAX_BOZORTH_MINUTIAE ],
int thetacol[ MAX_BOZORTH_MINUTIAE ],
int * ncomparisons,
int cols[][ COLS_SIZE_2 ],
int * colptrs[]
)
{ /* ... */ }
Can anyone shed some light?
Thanks in advance
- Arcadio
I'm currently struggling to compile a large piece of legacy code. GCC
3.3 compiles it without complaining, but GCC 4.2.3 (the default in
Debian) refuses it and signals "several array has incomplete element
type" errors.
I know that since 4.0 or so, GCC is less forgiving and does not accept
any arrays of incomplete type (see http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html).
However, I cannot see where the array types are incomplete here:
/* From the header */
void grphcs_enhnc_outsquare(unsigned char [][], const int, const int,
const int, const int y);
/* From the source: ERROR: Array type has incomplete element type */
void grphcs_enhnc_outsquare(unsigned char outsquare[][], const int w,
const int h, const int x, const int y)
{ /* ... */ }
/* From another header */
extern void bz_comp(int, int [], int [], int [], int *, int [][], int
*[]);
/* From the corresponding source: ERROR: Array type has incomplete
element type */
void bz_comp(
int npoints,
int xcol[ MAX_BOZORTH_MINUTIAE ],
int ycol[ MAX_BOZORTH_MINUTIAE ],
int thetacol[ MAX_BOZORTH_MINUTIAE ],
int * ncomparisons,
int cols[][ COLS_SIZE_2 ],
int * colptrs[]
)
{ /* ... */ }
Can anyone shed some light?
Thanks in advance
- Arcadio