unknown bound: array error.
Mark J. Turick
mturick@mrburns.npt.nuwc.navy.mil
Mon Jul 9 09:37:00 GMT 2001
I have a large amount of legacy code for a project that we support
on
various unix platforms. Some of the internal structures are defined
as:
typedef struct {
int xpos;
int ypos;
} XYCoordStruct, (*XYCoordPtr)[];
Note the pointer/array declaration. My belief is that at some point
in
Ancient times someone scattered those about to solve some array
problems they may have had with a ** declared variable.
This has never caused us a problem until I tried compiling with GCC
3.0
on Linux and Solaris 8. Gcc is complaining about function calls
using the
variables. Worst thing is, its treating this as an error, not a
warning.
ouch.
/diska/INCLUDE/libData.h:236: parameter `rpts' includes
pointer to array of unknown bound `XYCoordStruct[]
where "libData.h" has a call like this:
int libdReturnVCoords (
libfHandle, int id_index, int time, int npts,
XYCoordPtr rpts, int *nearest );
I think that I've fairly exhaustively examined all the documentation
concerning command line switches, and any that seem like they might
help, haven't.
Does anyone know of a switch that will allow gcc to let these
through
without complaint? There is too much code (that works fine with
all the
other compilers we use) to change, so that isn't an option.
Thanks.
--
-MJT
[==========================================]
Mark J. Turick
mailto:mturick@mrburns npt nuwc navy mil
[==========================================]
More information about the Gcc-help
mailing list